aboutsummaryrefslogtreecommitdiff
path: root/src/im-sandbox.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-07-21 11:51:56 +0200
committerThomas White <taw@physics.org>2021-07-21 15:34:31 +0200
commit6d94d4115c254d344bbb927596a7141ef39fd298 (patch)
tree652d07c4d6a9521c9359aa13bbda27309f53e6f8 /src/im-sandbox.c
parent50cf52b0bc0baa683b9508568131a3f6281bf4ff (diff)
Add missing cleanup on error paths
Diffstat (limited to 'src/im-sandbox.c')
-rw-r--r--src/im-sandbox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index 4d40c461..62483044 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -529,6 +529,7 @@ static void add_pipe(struct sandbox *sb, int fd)
fhs_new = realloc(sb->fhs, (sb->n_read+1)*sizeof(FILE *));
if ( fhs_new == NULL ) {
ERROR("Failed to allocate memory for new FH.\n");
+ free(fds_new);
return;
}