diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-22 11:36:32 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-22 11:36:32 -0400 |
| commit | bd27953a9c54c158bafeb90ffad0d2a0bda366e1 (patch) | |
| tree | 44bac8f14bd627aa72d5cbbc463643f338849c44 | |
| parent | ddd07afa39394c7b485c8d647c5db08845fa24fe (diff) | |
| download | stasis-bd27953a9c54c158bafeb90ffad0d2a0bda366e1.tar.gz | |
file_replace_text: close temp file handle on error
| -rw-r--r-- | src/lib/core/relocation.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/core/relocation.c b/src/lib/core/relocation.c index bd5504b..ea8b9c6 100644 --- a/src/lib/core/relocation.c +++ b/src/lib/core/relocation.c @@ -138,6 +138,7 @@ int file_replace_text(const char* filename, const char* target, const char* repl fp = fopen(filename, "w+"); if (!fp) { SYSERROR("unable to reopen %s for writing", filename); + fclose(tfp); return -1; } |
