* pgm.c (pgm_free): Cleanup police: destroy the p->usbpid

list when freeing the programmer struct.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1290 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2014-03-12 21:20:32 +00:00
parent b9420a9831
commit a341da1fec
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-03-12 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* pgm.c (pgm_free): Cleanup police: destroy the p->usbpid
list when freeing the programmer struct.
2014-03-12 Joerg Wunsch <j.gnu@uriah.heep.sax.de> 2014-03-12 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #40782: Verify errors for object size > 16 k on x32e5 due bug #40782: Verify errors for object size > 16 k on x32e5 due

3
pgm.c
View File

@ -140,7 +140,8 @@ PROGRAMMER * pgm_new(void)
void pgm_free(PROGRAMMER * const p) void pgm_free(PROGRAMMER * const p)
{ {
ldestroy_cb(p->id,free); ldestroy_cb(p->id, free);
ldestroy_cb(p->usbpid, free);
p->id = NULL; p->id = NULL;
/* this is done by pgm_teardown, but usually cookie is not set to NULL */ /* this is done by pgm_teardown, but usually cookie is not set to NULL */
/* if (p->cookie !=NULL) { /* if (p->cookie !=NULL) {