Fix exceptional leak in msi.c

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-09-10 19:15:59 +02:00
parent d69a6843e7
commit 35da73beff

View File

@ -1552,6 +1552,7 @@ MSISession *msi_init_session ( Messenger *messenger, int32_t max_calls )
if (retu == NULL) { if (retu == NULL) {
LOGGER_ERROR("Allocation failed! Program might misbehave!"); LOGGER_ERROR("Allocation failed! Program might misbehave!");
timer_terminate_session(handler);
return NULL; return NULL;
} }
@ -1561,6 +1562,7 @@ MSISession *msi_init_session ( Messenger *messenger, int32_t max_calls )
if (!(retu->calls = calloc( sizeof (MSICall *), max_calls ))) { if (!(retu->calls = calloc( sizeof (MSICall *), max_calls ))) {
LOGGER_ERROR("Allocation failed! Program might misbehave!"); LOGGER_ERROR("Allocation failed! Program might misbehave!");
timer_terminate_session(handler);
free(retu); free(retu);
return NULL; return NULL;
} }