summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-01-09 19:45:03 +0000
committerThierry Vignaud <tv@mageia.org>2012-01-09 19:45:03 +0000
commitf0df55b724be2779864edab88dde9c60ce31ed2b (patch)
tree3a2121b14eecd3243444502e3ba8ba2b2c1ac012
parente5053d8e51a7c518159c52e872ca3e8298fe30cf (diff)
downloadldetect-f0df55b724be2779864edab88dde9c60ce31ed2b.tar
ldetect-f0df55b724be2779864edab88dde9c60ce31ed2b.tar.gz
ldetect-f0df55b724be2779864edab88dde9c60ce31ed2b.tar.bz2
ldetect-f0df55b724be2779864edab88dde9c60ce31ed2b.tar.xz
ldetect-f0df55b724be2779864edab88dde9c60ce31ed2b.zip
(parse_device,modalias_cleanup) plug last (small) memleaks
-rw-r--r--NEWS2
-rw-r--r--hid.c2
-rw-r--r--modalias.c2
3 files changed, 6 insertions, 0 deletions
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;
}