From 05cc7df031c523378ed1b2db0c1258ce57262b07 Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Fri, 12 Dec 2014 20:41:27 -0500 Subject: [PATCH] Fixed a memory leak --- toxav/codec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toxav/codec.c b/toxav/codec.c index a1aa2869..eede83b4 100644 --- a/toxav/codec.c +++ b/toxav/codec.c @@ -480,6 +480,7 @@ CSSession *cs_new(const ToxAvCSettings *cs_self, const ToxAvCSettings *cs_peer, if (create_recursive_mutex(cs->queue_mutex) != 0) { LOGGER_WARNING("Failed to create recursive mutex!"); + free(cs); return NULL; } @@ -667,4 +668,4 @@ void queue_message(RTPSession *session, RTPMessage *msg) end: rtp_free_msg(NULL, msg); } -} \ No newline at end of file +}