]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
kmod-modprobe: fix leak in command line option processing.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Thu, 22 Dec 2011 01:54:35 +0000 (23:54 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 23 Dec 2011 03:25:21 +0000 (01:25 -0200)
not that it should matter for the binary, but let's be strict with
leaks so running in valgrind never complains.

tools/kmod-modprobe.c

index 2ae8af4263acaa304ecbffd307dd6e087d97d329..6379cae3c4ceda866af32eb80a52ef7909318e8e 100644 (file)
@@ -1208,11 +1208,13 @@ int main(int argc, char **orig_argv)
                        puts(PACKAGE " version " VERSION);
                        if (argv != orig_argv)
                                free(argv);
+                       free(config_paths);
                        return EXIT_SUCCESS;
                case 'h':
                        help(argv[0]);
                        if (argv != orig_argv)
                                free(argv);
+                       free(config_paths);
                        return EXIT_SUCCESS;
                case '?':
                        goto cmdline_failed;