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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>

Found this while investigating memory leaks on kms_flip. Detected by
Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
---
 lib/drmtest.c | 2 ++
 1 file changed, 2 insertions(+)

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;
-- 
1.8.3.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux