git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] ssh signing: don't detach the filename strbuf from key_file tempfile

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jul 6, 2025, 21:21 UTC
Message-ID
<aGro2h1VsSEYYCmp@fruit.crustytoothpaste.net>
In-Reply-To
<20250706173450.12995-1-redoste@redoste.xyz>
On 2025-07-06 at 17:34:49, redoste wrote:
Show 10 quoted lines
> Detaching the filename string from the tempfile structure used to cause
> delete_tempfile() to fail and the temporary file was not cleaned up.
> 
> While it's possible to get rid of the allocation and copy from
> xstrdup(), it keeps the code symetric with the other branch since
> interpolate_path() also allocates and ssh_signing_key_file is freed
> in both cases.
> 
> Helped-by: brian m. carlson <sandals@crustytoothpaste.net>
> Signed-off-by: redoste <redoste@redoste.xyz>

Yup, this looks good to me. Thanks so much for the patch; I always appreciate keeping the temporary directory tidy.

-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Previous: redosteNext: Patrick Steinhardt
Message 11 of 21 in “ssh signing: don't detach the filename strbuf from key_file tempfile”
  1. ssh signing: don't detach the filename strbuf from key_file tempfileredoste, Jul 4, 2025
  2. Jeff KingJul 5, 2025
  3. brian m. carlsonJul 5, 2025
  4. redosteJul 5, 2025
  5. redosteJul 5, 2025
  6. brian m. carlsonJul 6, 2025
  7. Jeff KingJul 6, 2025
  8. redosteJul 6, 2025
  9. redosteJul 6, 2025
  10. ssh signing: don't detach the filename strbuf from key_file tempfileredoste, Jul 6, 2025
  11. brian m. carlsonJul 6, 2025
  12. Patrick SteinhardtJul 7, 2025
  13. Phillip WoodJul 7, 2025
  14. redosteJul 7, 2025
  15. Phillip WoodJul 7, 2025
  16. redosteJul 7, 2025
  17. Phillip WoodJul 7, 2025
  18. ssh signing: don't detach the filename strbuf from key_file tempfileredoste, Jul 7, 2025
  19. Junio C HamanoJul 7, 2025
  20. Patrick SteinhardtJul 8, 2025
  21. Phillip WoodJul 8, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.