Fix CID 1243234

This commit is contained in:
condret 2014-10-04 00:06:34 +02:00
parent a9b78503c5
commit b43409f03b

View File

@ -1113,9 +1113,11 @@ int tms320_dasm_init(tms320_dasm_t * dasm) {
}
int tms320_dasm_fini(tms320_dasm_t * dasm) {
if (dasm && dasm->map)
ht_(free)(dasm->map);
if (dasm) {
if (dasm->map)
ht_(free)(dasm->map);
/* avoid double free */
memset (dasm, 0, sizeof (tms320_dasm_t));
memset (dasm, 0, sizeof (tms320_dasm_t));
}
return 0;
}