-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David Sommerseth wrote: > - - const char *return_value = NULL; > + aresp[i].resp = NULL; > > This I didn't think about, but I saw another potential leak. > However, your idea here is clever! But I would probably > suggest: > > if( aresp[i].resp ) { > free(aresp[i].resp); > aresp[i].resp = NULL; > } > > But! The potential culprit here is if the aresp[i] struct is not > zeroed before usage. If it is not and this pointer is pointing > at something it do not own, your patch is definitely more the > correct approach.
It was already nulled at post-patch line 558. I think that the additional NULLing makes the code more readable but strictly speaking it is not necessary. Daniel Johnson progman2...@usa.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkslSP8ACgkQ6vGcUBY+ge+69gCgwHLbuJsf03uuWXTbP9iI0r9a RdAAn13l4KIRFa1WR38lDWs3SHu3iJxU =5kly -----END PGP SIGNATURE-----