Skip to content

Commit

Permalink
Merge pull request #45 from ifakhrutdinov/bugfix/file-api-descriptor-…
Browse files Browse the repository at this point in the history
…leak

File API descriptor leak
  • Loading branch information
1000TurquoisePogs authored Jun 26, 2019
2 parents a886e25 + c8c5243 commit 7f7f7f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c/httpserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3771,7 +3771,7 @@ void respondWithUnixDirectory(HttpResponse *response, char* absolutePath, int js
fflush(stdout);
#endif

if (directory = (directoryOpen(absolutePath,&returnCode,&reasonCode)) == NULL){
if ((directory = directoryOpen(absolutePath,&returnCode,&reasonCode)) == NULL){
respondWithJsonError(response, "Permission denied", 403, "Forbidden");
// Response is finished on return
}
Expand Down

0 comments on commit 7f7f7f2

Please sign in to comment.