Fix a memory leak.
Obtained from: elftoolchain MFC after: 1 month
This commit is contained in:
parent
e88f9fb47f
commit
e2efa43644
@ -855,11 +855,13 @@ _libelf_write_elf(Elf *e, off_t newsize)
|
||||
e->e_u.e_elf.e_phdr.e_phdr64 = NULL;
|
||||
}
|
||||
|
||||
free(newfile);
|
||||
|
||||
return (rc);
|
||||
|
||||
error:
|
||||
if (newfile)
|
||||
free(newfile);
|
||||
free(newfile);
|
||||
|
||||
return ((off_t) -1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user