FS-9074: [mod_skinny] Fix incorrect location of free causing memory leak of xml when certain errors occur

This commit is contained in:
Nathan Neulinger 2016-04-15 08:24:28 -05:00
parent 0557e25b67
commit 44258634e1

View File

@ -1353,9 +1353,6 @@ switch_status_t skinny_handle_register(listener_t *listener, skinny_message_t *r
}
}
}
if (xroot) {
switch_xml_free(xroot);
}
status = SWITCH_STATUS_SUCCESS;
@ -1372,6 +1369,10 @@ switch_status_t skinny_handle_register(listener_t *listener, skinny_message_t *r
keepalive_listener(listener, NULL);
end:
if (xroot) {
switch_xml_free(xroot);
}
if(params) {
switch_event_destroy(&params);
}