drmtest: don't leak memory when parsing the arguments
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Mon, 30 Dec 2013 13:20:39 +0000 (11:20 -0200)
committerPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 7 Jan 2014 11:57:03 +0000 (09:57 -0200)
Found this while investigating memory leaks on kms_flip. Detected by
Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
lib/drmtest.c

index 3d79a4d..7275b7f 100644 (file)
@@ -911,6 +911,8 @@ int igt_subtest_init_parse_opts(int argc, char **argv,
        oom_adjust_for_doom();
 
 out:
+       free(short_opts);
+       free(combined_opts);
        print_version();
 
        return ret;