Skip to content

Commit

Permalink
"Possible memory leak. Dynamic memory stored in 'entry' allocated
Browse files Browse the repository at this point in the history
through function 'entry_new' at line 97 can be lost at line 104. Also
there is one similar error on line 113." (Klocwork.com Issue #127)

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6719 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed May 24, 2011
1 parent 9953300 commit 011e11e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cherokee/validator_authlist.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ add_new_user (cherokee_validator_authlist_props_t *props,
ret = cherokee_config_node_read (conf, "user", &tmp); ret = cherokee_config_node_read (conf, "user", &tmp);
if (ret != ret_ok) { if (ret != ret_ok) {
LOG_ERROR (CHEROKEE_ERROR_VALIDATOR_AUTHLIST_USER, conf->val.buf); LOG_ERROR (CHEROKEE_ERROR_VALIDATOR_AUTHLIST_USER, conf->val.buf);
entry_free (entry);
return ret_error; return ret_error;
} }
cherokee_buffer_add_buffer (&entry->user, tmp); cherokee_buffer_add_buffer (&entry->user, tmp);
Expand All @@ -110,6 +111,7 @@ add_new_user (cherokee_validator_authlist_props_t *props,
ret = cherokee_config_node_read (conf, "password", &tmp); ret = cherokee_config_node_read (conf, "password", &tmp);
if (ret != ret_ok) { if (ret != ret_ok) {
LOG_ERROR (CHEROKEE_ERROR_VALIDATOR_AUTHLIST_PASSWORD, conf->val.buf); LOG_ERROR (CHEROKEE_ERROR_VALIDATOR_AUTHLIST_PASSWORD, conf->val.buf);
entry_free (entry);
return ret_error; return ret_error;
} }
cherokee_buffer_add_buffer (&entry->password, tmp); cherokee_buffer_add_buffer (&entry->password, tmp);
Expand Down

0 comments on commit 011e11e

Please sign in to comment.