test/cmdline: fix memory leak
authorDavid Marchand <david.marchand@redhat.com>
Fri, 29 Oct 2021 11:23:15 +0000 (13:23 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 4 Nov 2021 10:19:26 +0000 (11:19 +0100)
Previous change wrongly removed cmdline_free().

Fixes: 6ad06203a587 ("cmdline: free on exit")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
app/test/test_cmdline_lib.c

index f238094..f50ccdb 100644 (file)
@@ -176,6 +176,8 @@ test_cmdline_socket_fns(void)
                printf("Error: failed to open /dev/null for reading!");
                return -1;
        }
+       cmdline_free(cl);
+       cl = NULL;
 
        /* void functions */
        cmdline_stdin_exit(NULL);