Permalink
Browse files

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

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

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6679 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent 605bcb1 commit 1418874ca52ec3dba632250ab842c7bddc8e76bc @alobbs alobbs committed May 22, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 cherokee/handler_render_rrd.c
@@ -597,7 +597,11 @@ cherokee_handler_render_rrd_new (cherokee_handler_t **hdl,
} else {
ret = cherokee_handler_file_new ((cherokee_handler_t **)&n->file_hdl, cnt, MODULE_PROPS(PROP_RENDER_RRD(props)->file_props));
if (ret != ret_ok) {
- return ret_ok;
+ if (n->file_hdl) {
+ cherokee_handler_free (HANDLER(n->file_hdl));
+ }
+ cherokee_handler_free (HANDLER(n));
+ return ret_error;
}
HANDLER(n)->support = HANDLER(n->file_hdl)->support;

0 comments on commit 1418874

Please sign in to comment.