mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-01 22:33:48 +00:00
[mod_conference] Fix memory leaks and a possible deadlock in chat_send();
This commit is contained in:
parent
55b148f1c3
commit
a198e765fe
@ -1029,17 +1029,18 @@ switch_status_t chat_send(switch_event_t *message_event)
|
|||||||
conference_list_pretty(conference, &stream);
|
conference_list_pretty(conference, &stream);
|
||||||
/* provide help */
|
/* provide help */
|
||||||
} else {
|
} else {
|
||||||
return SWITCH_STATUS_SUCCESS;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_safe_free(lbuf);
|
|
||||||
|
|
||||||
if (!conference->broadcast_chat_messages) {
|
if (!conference->broadcast_chat_messages) {
|
||||||
switch_core_chat_send_args(proto, CONF_CHAT_PROTO, to, hint && strchr(hint, '/') ? hint : from, "", stream.data, NULL, NULL, SWITCH_FALSE);
|
switch_core_chat_send_args(proto, CONF_CHAT_PROTO, to, hint && strchr(hint, '/') ? hint : from, "", stream.data, NULL, NULL, SWITCH_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done:
|
||||||
|
switch_safe_free(lbuf);
|
||||||
switch_safe_free(stream.data);
|
switch_safe_free(stream.data);
|
||||||
|
|
||||||
switch_thread_rwlock_unlock(conference->rwlock);
|
switch_thread_rwlock_unlock(conference->rwlock);
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user