aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-07-07 11:58:49 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-07-07 11:58:49 -0400
commitfd514802fc23604c9f4f08146ee5f5ac1e46e0c4 (patch)
tree60cd56890340ee78efe1f2b465843b2686dde8ae
parent4a189db63597c66b15101ba0344494f49d9af3b1 (diff)
downloadstasis-close-pipe-on-error.tar.gz
BUGFIX: Close pipe on realloc errorclose-pipe-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 542f9fd..a8c9719 100644
--- a/src/lib/core/system.c
+++ b/src/lib/core/system.c
@@ -179,6 +179,7 @@ char *shell_output(const char *command, int *status) {
current_size += initial_size;
char *tmp = realloc(result, sizeof(*result) * current_size);
if (!tmp) {
+ pclose(pp);
guard_free(result);
return NULL;
}