aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-22 11:36:32 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-22 11:36:32 -0400
commitbd27953a9c54c158bafeb90ffad0d2a0bda366e1 (patch)
tree44bac8f14bd627aa72d5cbbc463643f338849c44
parentddd07afa39394c7b485c8d647c5db08845fa24fe (diff)
downloadstasis-bd27953a9c54c158bafeb90ffad0d2a0bda366e1.tar.gz
file_replace_text: close temp file handle on error
-rw-r--r--src/lib/core/relocation.c1
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;
}