Permalink
Browse files

"Possible memory leak. Dynamic memory stored in 'n' allocated through

function 'malloc' at line 42 can be lost at line 57" (Klocwork.com
Issue #54)

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6684 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent 7861d6b commit 369cfd20a01528ef9ffd6d8d2f5d1b6739b3a569 @alobbs alobbs committed May 22, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 cherokee/logger_combined.c
@@ -54,7 +54,10 @@ cherokee_logger_combined_new (cherokee_logger_t **logger,
/* Init the base class: NCSA
*/
ret = cherokee_logger_ncsa_init_base (n, vsrv, config);
- if (unlikely(ret < ret_ok)) return ret;
+ if (unlikely(ret < ret_ok)) {
+ cherokee_logger_free (LOGGER(n));
+ return ret;
+ }
/* Active the "Combined" bit
*/

0 comments on commit 369cfd2

Please sign in to comment.