From bf14ce5315465e9eb8eb72614b0bca74dc6576e9 Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Thu, 8 Nov 2018 11:44:16 +0000 Subject: [PATCH] test: fix clean up on failure One of the failure paths were not updated to clean up on exit, most likely due to rebase error. Fix the failure path to clean up instead of simply exiting. Fixes: 3f9e31d71d63 ("test: clean up on exit") Signed-off-by: Anatoly Burakov --- test/test/test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test/test.c b/test/test/test.c index 24df6299ea..12fabd0baf 100644 --- a/test/test/test.c +++ b/test/test/test.c @@ -102,8 +102,10 @@ main(int argc, char **argv) /* merge argc/argv and the environment args */ all_argc = argc + eargc; all_argv = malloc(sizeof(*all_argv) * (all_argc + 1)); - if (all_argv == NULL) - return -1; + if (all_argv == NULL) { + ret = -1; + goto out; + } for (i = 0; i < argc; i++) all_argv[i] = argv[i]; -- 2.20.1