Skip to content
This repository
Browse code

"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...
commit 369cfd20a01528ef9ffd6d8d2f5d1b6739b3a569 1 parent 7861d6b
Alvaro Lopez Ortega authored

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  cherokee/logger_combined.c
5  cherokee/logger_combined.c
@@ -54,7 +54,10 @@ cherokee_logger_combined_new (cherokee_logger_t         **logger,
54 54
 	/* Init the base class: NCSA
55 55
 	 */
56 56
 	ret = cherokee_logger_ncsa_init_base (n, vsrv, config);
57  
-	if (unlikely(ret < ret_ok)) return ret;
  57
+	if (unlikely(ret < ret_ok)) {
  58
+		cherokee_logger_free (LOGGER(n));
  59
+		return ret;
  60
+	}
58 61
 
59 62
 	/* Active the "Combined" bit
60 63
 	 */

0 notes on commit 369cfd2

Please sign in to comment.
Something went wrong with that request. Please try again.