aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-05-12 10:51:47 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-05-12 10:51:47 -0400
commit99d7e7c5fd5030cd901afe276d73831f734f1428 (patch)
tree6294059857ce8e863a3b875c53ff226a0cf33283
parent58ca01047c5da6f244525ca612154d220cef8819 (diff)
downloadstasis-99d7e7c5fd5030cd901afe276d73831f734f1428.tar.gz
free result on error
-rw-r--r--src/lib/core/system.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/core/system.c b/src/lib/core/system.c
index f0fd38f..d0956f4 100644
--- a/src/lib/core/system.c
+++ b/src/lib/core/system.c
@@ -177,6 +177,7 @@ char *shell_output(const char *command, int *status) {
current_size += initial_size;
char *tmp = realloc(result, sizeof(*result) * current_size);
if (!tmp) {
+ guard_free(result);
return NULL;
}
result = tmp;