char reply[512] = "";
switch_core_session_t *session = NULL;
switch_channel_t *channel = NULL;
-
+ switch_event_t *revent = NULL;
switch_mutex_lock(listen_list.mutex);
prefs.threads++;
}
while (switch_test_flag(listener, LFLAG_RUNNING) && listen_list.ready) {
- switch_event_t *revent;
-
len = sizeof(buf);
memset(buf, 0, len);
status = read_packet(listener, &revent, 0);
break;
}
+ switch_event_destroy(&revent);
+
if (*reply != '\0') {
if (*reply == '~') {
switch_snprintf(buf, sizeof(buf), "Content-Type: command/reply\n%s", reply + 1);
}
done:
+
+ if (revent) {
+ switch_event_destroy(&revent);
+ }
remove_listener(listener);
EVENT_NODES[n->event_id] = n->next;
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Event Binding deleted for %s:%s\n", n->id, switch_event_name(n->event_id));
- n->subclass = NULL;
+ if (n->subclass) {
+ FREE(n->subclass->owner);
+ FREE(n->subclass->name);
+ FREE(n->subclass);
+ }
FREE(n->id);
FREE(n);
status = SWITCH_STATUS_SUCCESS;