mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 22:46:15 +01:00
gresources: fix memory leak from libelf
Memory was leaking when allocating it inside libelf and losing the pointer to it (it was an automatic variable) when returning NULL from the get_elf function in some cases Closes #3242 Signed-off-by: Maxim Moskalets <Maxim.Moskalets@kaspersky.com>
This commit is contained in:
parent
3f4e6ddcd8
commit
aa8ed92fba
@ -165,6 +165,7 @@ get_elf (const gchar *file,
|
||||
|
||||
if (elf_kind (elf) != ELF_K_ELF)
|
||||
{
|
||||
elf_end (elf);
|
||||
g_close (*fd, NULL);
|
||||
*fd = -1;
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user