mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
Make sure to cleanup event if there was a failure that caused it not to be fired.
This commit is contained in:
parent
a181ec629f
commit
5c60bd6b42
@ -766,6 +766,10 @@ static switch_status_t handle_msg_sendevent(listener_t *listener, int arity, ei_
|
||||
ei_x_encode_atom(rbuf, "ok");
|
||||
}
|
||||
}
|
||||
/* If the event wasn't successfully fired, or failed for any other reason, then make sure not to leak it. */
|
||||
if ( event ) {
|
||||
switch_event_destroy(&event)
|
||||
}
|
||||
}
|
||||
}
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user