libmach: plug another memory leak
Change-Id: Ia5c888db1f0ded2aa92238d994239e46bf52667a
This commit is contained in:
parent
2c97de1a26
commit
2897735523
1 changed files with 2 additions and 0 deletions
|
|
@ -69,6 +69,7 @@ crackhdr(char *name, int mode)
|
||||||
return hdr;
|
return hdr;
|
||||||
}
|
}
|
||||||
werrstr("unknown file type: %r");
|
werrstr("unknown file type: %r");
|
||||||
|
free(hdr->filename);
|
||||||
free(hdr);
|
free(hdr);
|
||||||
close(fd);
|
close(fd);
|
||||||
return nil;
|
return nil;
|
||||||
|
|
@ -89,6 +90,7 @@ uncrackhdr(Fhdr *hdr)
|
||||||
for(i=0; i<hdr->nthread; i++)
|
for(i=0; i<hdr->nthread; i++)
|
||||||
free(hdr->thread[i].ureg);
|
free(hdr->thread[i].ureg);
|
||||||
free(hdr->thread);
|
free(hdr->thread);
|
||||||
|
free(hdr->filename);
|
||||||
free(hdr);
|
free(hdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue