From 35da73beff0ea860a580264e96e724e50c715462 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Wed, 10 Sep 2014 19:15:59 +0200 Subject: [PATCH] Fix exceptional leak in msi.c --- toxav/msi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toxav/msi.c b/toxav/msi.c index dad32afe..19925f9d 100644 --- a/toxav/msi.c +++ b/toxav/msi.c @@ -1552,6 +1552,7 @@ MSISession *msi_init_session ( Messenger *messenger, int32_t max_calls ) if (retu == NULL) { LOGGER_ERROR("Allocation failed! Program might misbehave!"); + timer_terminate_session(handler); return NULL; } @@ -1561,6 +1562,7 @@ MSISession *msi_init_session ( Messenger *messenger, int32_t max_calls ) if (!(retu->calls = calloc( sizeof (MSICall *), max_calls ))) { LOGGER_ERROR("Allocation failed! Program might misbehave!"); + timer_terminate_session(handler); free(retu); return NULL; }