mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-03-10 02:08:34 +00:00
Free file descriptor if we couldn't find the file
This commit is contained in:
@@ -794,6 +794,7 @@ static unsigned char kBITPNGEndChunk[4] = {0x49, 0x45, 0x4e, 0x44};
|
||||
int fd = open([path UTF8String], O_RDONLY, 0);
|
||||
if (fstat(fd, &fs) < 0) {
|
||||
// File not found
|
||||
free(fd);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user