mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 15:50:59 +00:00
[libdingaling] Fix memory leaks
This commit is contained in:
parent
322191a2f4
commit
7713a2470d
@ -1297,6 +1297,8 @@ static int on_subscribe(void *user_data, ikspak *pak)
|
||||
handle->session_callback(handle, NULL, LDL_SIGNAL_SUBSCRIBE, to, from, NULL, NULL);
|
||||
}
|
||||
|
||||
if (id) free(id);
|
||||
|
||||
return IKS_FILTER_EAT;
|
||||
}
|
||||
|
||||
@ -2325,6 +2327,9 @@ void ldl_handle_send_msg(ldl_handle_t *handle, char *from, char *to, const char
|
||||
if (strchr(my_body, '<')) {
|
||||
len = (int) strlen(my_body);
|
||||
if (!(bdup = malloc(len))) {
|
||||
if (my_body_base) {
|
||||
free(my_body_base);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user