fix leaks and edge case segs

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16014 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-12-22 06:55:55 +00:00
parent 2ccca75215
commit b2694f2c4b
1 changed files with 4 additions and 3 deletions

View File

@ -79,6 +79,7 @@ SWITCH_STANDARD_API(db_cache_function) {
error:
stream->write_function(stream, "%s", "parameter missing\n");
ok:
switch_safe_free(mydata);
return SWITCH_STATUS_SUCCESS;
}
@ -449,7 +450,7 @@ SWITCH_STANDARD_API(in_group_function)
stream->write_function(stream, "%s", rval);
switch_xml_free(xml);
free(mydata);
switch_safe_free(mydata);
switch_event_destroy(&params);
return SWITCH_STATUS_SUCCESS;
@ -529,7 +530,7 @@ SWITCH_STANDARD_API(user_data_function)
end:
switch_xml_free(xml);
free(mydata);
switch_safe_free(mydata);
switch_event_destroy(&params);
return SWITCH_STATUS_SUCCESS;
@ -607,7 +608,7 @@ static switch_status_t _find_user(const char *cmd, switch_core_session_t *sessio
switch_xml_free(xml);
free(mydata);
switch_safe_free(mydata);
return SWITCH_STATUS_SUCCESS;
}