From a9df11d0bebb468f8202b647ea0cb19fa828a87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Spie=C3=9F?= Date: Wed, 21 Oct 2015 00:05:31 +0200 Subject: [PATCH] Free file descriptor if we couldn't find the file --- Classes/BITAuthenticator.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Classes/BITAuthenticator.m b/Classes/BITAuthenticator.m index 270f5b68c5..53165e464a 100644 --- a/Classes/BITAuthenticator.m +++ b/Classes/BITAuthenticator.m @@ -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; }