diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | usb.c | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -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 @@ -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; } |