From 6d94d4115c254d344bbb927596a7141ef39fd298 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 21 Jul 2021 11:51:56 +0200 Subject: Add missing cleanup on error paths --- src/im-sandbox.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/im-sandbox.c') 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; } -- cgit v1.2.3