diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-01-08 00:42:25 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-01-08 00:42:25 +0000 |
commit | 774ce5b486c495269afda8799d26dfd8d92a3c62 (patch) | |
tree | 09c95b048a6a4f73c7e72aecc4f3ed8bb30e452c | |
parent | c57f79833dfb7b781c0478102661c175e82ee321 (diff) | |
download | ldetect-774ce5b486c495269afda8799d26dfd8d92a3c62.tar ldetect-774ce5b486c495269afda8799d26dfd8d92a3c62.tar.gz ldetect-774ce5b486c495269afda8799d26dfd8d92a3c62.tar.bz2 ldetect-774ce5b486c495269afda8799d26dfd8d92a3c62.tar.xz ldetect-774ce5b486c495269afda8799d26dfd8d92a3c62.zip |
(free_*) fix segfaulting when calling usb_probe() more than once
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | names.c | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -1,4 +1,5 @@ - fix double free +- fix segfaulting when calling usb_probe() more than once Version 0.11.4 - 5 January 2012, Thierry Vignaud @@ -496,6 +496,7 @@ static void free_vendor(void) for (i = 0; i < HASHSZ; i++) { cur = vendors[i]; + vendors[i] = NULL; while (cur) { tmp = cur; cur = cur->next; @@ -511,6 +512,7 @@ static void free_product(void) for (i = 0; i < HASHSZ; i++) { cur = products[i]; + products[i] = NULL; while (cur) { tmp = cur; cur = cur->next; @@ -526,6 +528,7 @@ static void free_class(void) for (i = 0; i < HASHSZ; i++) { cur = classes[i]; + classes[i] = NULL; while (cur) { tmp = cur; cur = cur->next; @@ -541,6 +544,7 @@ static void free_subclass(void) for (i = 0; i < HASHSZ; i++) { cur = subclasses[i]; + subclasses[i] = NULL; while (cur) { tmp = cur; cur = cur->next; @@ -556,6 +560,7 @@ static void free_protocol(void) for (i = 0; i < HASHSZ; i++) { cur = protocols[i]; + protocols[i] = NULL; while (cur) { tmp = cur; cur = cur->next; @@ -571,6 +576,7 @@ static void free_audioterminal(void) for (i = 0; i < HASHSZ; i++) { cur = audioterminals[i]; + audioterminals[i] = NULL; while (cur) { tmp = cur; cur = cur->next; @@ -587,6 +593,7 @@ static void free_videoterminal(void) for (i = 0; i < HASHSZ; i++) { cur = videoterminals[i]; + videoterminals[i] = NULL; while (cur) { tmp = cur; cur = cur->next; @@ -602,6 +609,7 @@ static void _free_genericstrtable(struct genericstrtable *t[HASHSZ]) for (i = 0; i < HASHSZ; i++) { cur = t[i]; + t[i] = NULL; while (cur) { tmp = cur; cur = cur->next; |