summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--usb.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index da285c4..3df8cd2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
- plug some memleaks
- sync with names with usbutils-005
+ (thus fixing more memleaks)
Version 0.11.3 - 21 November 2011, Thierry Vignaud
diff --git a/usb.c b/usb.c
index 2d5b77f..60925d4 100644
--- a/usb.c
+++ b/usb.c
@@ -57,7 +57,7 @@ extern struct pciusb_entries usb_probe(void) {
free(err_msg);
}
r.entries = NULL;
- return r;
+ goto exit;
}
r.entries = malloc(sizeof(struct pciusb_entry) * MAX_DEVICES);
@@ -140,6 +140,9 @@ extern struct pciusb_entries usb_probe(void) {
r.entries = realloc(r.entries, sizeof(struct pciusb_entry) * r.nb);
pciusb_find_modules(&r, "usbtable", DO_NOT_LOAD, 0);
+
+exit:
+ names_exit();
return r;
}