Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

"Resource acquired to 'fd' at line 103 may be lost here."

(Klocwork.com Issue #112)

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6712 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
commit 45e061d818c161c7ddc2751675de04e56e393038 1 parent 7f63dc9
@alobbs alobbs authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  cherokee/shm.c
View
3  cherokee/shm.c
@@ -107,13 +107,14 @@ cherokee_shm_map (cherokee_shm_t *shm,
re = cherokee_fstat (fd, &info);
if (re != 0) {
+ cherokee_fd_close (fd);
return ret_error;
}
shm->mem = mmap (0, info.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (shm->mem == MAP_FAILED) {
- cherokee_fd_close (fd);
shm->mem = NULL;
+ cherokee_fd_close (fd);
return ret_error;
}
Please sign in to comment.
Something went wrong with that request. Please try again.