diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-01-05 19:06:36 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-01-05 19:06:36 +0000 |
commit | 3944ab661769d37b2c352a5b748a54b821e3e671 (patch) | |
tree | f02c14e1d16d2c65fb4a4a5f71e58ad014935644 | |
parent | d4b800ce34c7060080ec40d97c88d17982961e39 (diff) | |
download | ldetect-3944ab661769d37b2c352a5b748a54b821e3e671.tar ldetect-3944ab661769d37b2c352a5b748a54b821e3e671.tar.gz ldetect-3944ab661769d37b2c352a5b748a54b821e3e671.tar.bz2 ldetect-3944ab661769d37b2c352a5b748a54b821e3e671.tar.xz ldetect-3944ab661769d37b2c352a5b748a54b821e3e671.zip |
(usb_probe) free last memleak by using new usbutils' names_exit()
(introduced in r258129 by pterjan on 2009-06-25: "Use usb.ids")
-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; } |