aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-07-07 11:59:55 -0400
committerGitHub <noreply@github.com>2026-07-07 11:59:55 -0400
commit6171233840094edfe3b60be546b15664fe5fa3ea (patch)
tree60cd56890340ee78efe1f2b465843b2686dde8ae
parent4a189db63597c66b15101ba0344494f49d9af3b1 (diff)
parentfd514802fc23604c9f4f08146ee5f5ac1e46e0c4 (diff)
downloadstasis-6171233840094edfe3b60be546b15664fe5fa3ea.tar.gz
Merge pull request #153 from jhunkeler/close-pipe-on-error
BUGFIX: Close pipe on realloc 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;
}