From f0df55b724be2779864edab88dde9c60ce31ed2b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 9 Jan 2012 19:45:03 +0000 Subject: (parse_device,modalias_cleanup) plug last (small) memleaks --- NEWS | 2 ++ hid.c | 2 ++ modalias.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 9bd192e..3a84f98 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- plug last (small) memleaks + Version 0.11.5 - 8 January 2012, Thierry Vignaud - fix double free diff --git a/hid.c b/hid.c index 2103c00..be8d3c0 100644 --- a/hid.c +++ b/hid.c @@ -116,6 +116,8 @@ static void parse_device(struct hid_entries *entries, const char *dev) DEBUG("%s: module name is [%s]\n", HID_BUS_NAME, modname); if (modname != NULL) add_entry(entries, device_name, modname); + free(device_name); + modalias_cleanup(); } diff --git a/modalias.c b/modalias.c index f5a667b..8feace5 100644 --- a/modalias.c +++ b/modalias.c @@ -125,4 +125,6 @@ char *modalias_resolve_module(const char *modalias) { void modalias_cleanup(void) { ifree(aliasdefault); + free(version); + version = NULL; } -- cgit v1.2.1