mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
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;
|
||||
}
|
||||
werrstr("unknown file type: %r");
|
||||
free(hdr->filename);
|
||||
free(hdr);
|
||||
close(fd);
|
||||
return nil;
|
||||
|
@ -89,6 +90,7 @@ uncrackhdr(Fhdr *hdr)
|
|||
for(i=0; i<hdr->nthread; i++)
|
||||
free(hdr->thread[i].ureg);
|
||||
free(hdr->thread);
|
||||
free(hdr->filename);
|
||||
free(hdr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue