From ce82e36c140770dbc4b90c24035b4c8bc5ed2a60 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Tue, 17 Aug 2021 14:39:44 -0600 Subject: [PATCH] cli: fix memory leak when packages are not provided on the command line --- cli/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/main.c b/cli/main.c index 837fa8b..93f2e1c 100644 --- a/cli/main.c +++ b/cli/main.c @@ -1286,7 +1286,8 @@ main(int argc, char *argv[]) if (pkgq.head == NULL) { fprintf(stderr, "Please specify at least one package name on the command line.\n"); - return EXIT_FAILURE; + ret = EXIT_FAILURE; + goto out; } ret = EXIT_SUCCESS;