[Ltrace-devel] [PATCH] Fix a memory leak in parse_typedef_name

Роман Донченко dpb at corrigendum.ru
Mon Apr 27 18:20:34 UTC 2015


---
 read_config_file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/read_config_file.c b/read_config_file.c
index db41fea..644290e 100644
--- a/read_config_file.c
+++ b/read_config_file.c
@@ -387,6 +387,7 @@ parse_typedef_name(struct protolib *plib, struct locus *loc, char **str)
 		return NULL;
 
 	struct named_type *nt = protolib_lookup_type(plib, buf, true);
+	free(buf);
 	if (nt == NULL)
 		return NULL;
 	return nt->info;
-- 
1.8.5.6




More information about the Ltrace-devel mailing list