Skip to content
Snippets Groups Projects
Commit fb9622d0 authored by Simon McVittie's avatar Simon McVittie
Browse files

graphics: Don't end a NULL ELF object or close an invalid fd

parent bfb6c1ad
No related branches found
No related tags found
1 merge request!84Enumerate Mesa DRI modules and VA-API drivers
......@@ -2388,8 +2388,12 @@ _srt_get_library_class (const gchar *library)
class = gelf_getclass (elf);
out:
elf_end (elf);
close (fd);
if (elf != NULL)
elf_end (elf);
if (fd >= 0)
close (fd);
return class;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment