[Intel-gfx] [PATCH i-g-t 1/4] core: Free buffer allocated with vasprintf()

Damien Lespiau damien.lespiau at intel.com
Wed Jul 9 12:45:18 CEST 2014


We were leaking a bit.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 lib/igt_core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 7ac7ebe..364cdd0 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -591,6 +591,8 @@ void __igt_skip_check(const char *file, const int line,
 			 "Last errno: %i, %s\n"
 			 "Test requirement: (%s)\n%s",
 			 func, file, line, err, strerror(err), check, buf);
+
+		free(buf);
 	} else {
 		igt_skip("Test requirement not met in function %s, file %s:%i:\n"
 			 "Last errno: %i, %s\n"
-- 
1.8.3.1




More information about the Intel-gfx mailing list