mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fix exceptional leak in msi.c
This commit is contained in:
parent
d69a6843e7
commit
35da73beff
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user