mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-29 15:11:48 +00:00
Close the file descriptor in the same method that had been opened.
MD-20923
This commit is contained in:
parent
55f8918641
commit
c24408d255
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,6 @@ UpdateDialogGtk* (*update_dialog_gtk_new)() = 0;
|
||||||
bool extractFileFromBinary(int fd, const void* buffer, size_t length)
|
bool extractFileFromBinary(int fd, const void* buffer, size_t length)
|
||||||
{
|
{
|
||||||
size_t count = write(fd,buffer,length);
|
size_t count = write(fd,buffer,length);
|
||||||
close(fd);
|
|
||||||
return count >= length;
|
return count >= length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +57,7 @@ UpdateDialog* UpdateDialogGtkFactory::createDialog()
|
||||||
LOG(Warn,"Failed to load the GTK UI library - " + std::string(strerror(errno)));
|
LOG(Warn,"Failed to load the GTK UI library - " + std::string(strerror(errno)));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
close(libFd);
|
||||||
|
|
||||||
void* gtkLib = dlopen(libPath,RTLD_LAZY);
|
void* gtkLib = dlopen(libPath,RTLD_LAZY);
|
||||||
if (!gtkLib)
|
if (!gtkLib)
|
||||||
|
|
Loading…
Reference in a new issue