diff mbox

[2/6] drmtest: don't leak memory when parsing the arguments

Message ID 1388419013-17016-2-git-send-email-przanoni@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paulo Zanoni Dec. 30, 2013, 3:56 p.m. UTC
From: Paulo Zanoni <paulo.r.zanoni@intel.com>

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 | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 3d79a4d..7275b7f 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -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;