Fixed a memory leak

This commit is contained in:
Maxim Biro 2014-12-12 20:41:27 -05:00
parent 39cc14ccea
commit 05cc7df031

View File

@ -480,6 +480,7 @@ CSSession *cs_new(const ToxAvCSettings *cs_self, const ToxAvCSettings *cs_peer,
if (create_recursive_mutex(cs->queue_mutex) != 0) { if (create_recursive_mutex(cs->queue_mutex) != 0) {
LOGGER_WARNING("Failed to create recursive mutex!"); LOGGER_WARNING("Failed to create recursive mutex!");
free(cs);
return NULL; return NULL;
} }
@ -667,4 +668,4 @@ void queue_message(RTPSession *session, RTPMessage *msg)
end: end:
rtp_free_msg(NULL, msg); rtp_free_msg(NULL, msg);
} }
} }