From b85a9e398cf8c390b75a3061ccf3e98c16a73299 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 25 Jan 2016 13:05:55 -0500 Subject: [PATCH] fix two memory leaks closes #210 Change-Id: I786345342f415a5fbe7fa361e2961e0399f55b67 --- daemon/call.c | 1 + daemon/media_socket.c | 1 + 2 files changed, 2 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index 689eeba06..7d4831d37 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2218,6 +2218,7 @@ static void __call_free(void *p) { g_hash_table_destroy(c->tags); g_hash_table_destroy(c->viabranches); g_queue_clear(&c->medias); + g_queue_clear(&c->endpoint_maps); while (c->streams.head) { ps = g_queue_pop_head(&c->streams); diff --git a/daemon/media_socket.c b/daemon/media_socket.c index 9a9ed52ac..2a248eaa7 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -1428,6 +1428,7 @@ struct stream_fd *stream_fd_new(socket_t *fd, struct call *call, const struct lo sfd->call = obj_get(call); sfd->local_intf = lif; g_queue_push_tail(&call->stream_fds, sfd); /* hand over ref */ + g_slice_free1(sizeof(*fd), fd); /* moved into sfd, thus free */ __C_DBG("stream_fd_new localport=%d", sfd->socket.local.port);