diff options
author | David Schleef <ds@schleef.org> | 2014-09-04 00:17:48 -0700 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2014-09-04 00:17:48 -0700 |
commit | e1663995a5d2e494fdae2a0f0655815899c21f76 (patch) | |
tree | e3eee14e04c68b097ab201fc551038aa96f0f351 /rtmp | |
parent | fadc1313a96ad5df14322af4a3f92a8580f9ca16 (diff) |
fix memleaks
Diffstat (limited to 'rtmp')
-rw-r--r-- | rtmp/rtmpclient.c | 12 | ||||
-rw-r--r-- | rtmp/rtmpconnection.c | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/rtmp/rtmpclient.c b/rtmp/rtmpclient.c index 120e9a0..96cb94e 100644 --- a/rtmp/rtmpclient.c +++ b/rtmp/rtmpclient.c @@ -172,6 +172,10 @@ gst_rtmp_client_finalize (GObject * object) GST_DEBUG_OBJECT (rtmpclient, "finalize"); /* clean up object here */ + g_free (rtmpclient->server_address); + g_free (rtmpclient->stream); + g_object_unref (rtmpclient->connection); + g_object_unref (rtmpclient->socket_client); G_OBJECT_CLASS (gst_rtmp_client_parent_class)->finalize (object); } @@ -264,6 +268,8 @@ gst_rtmp_client_connect_done (GObject * source, GAsyncResult * result, gst_rtmp_connection_start_handshake (client->connection, FALSE); g_simple_async_result_complete (client->async); + g_object_unref (client->async); + client->async = NULL; } #if 0 @@ -297,16 +303,18 @@ gst_rtmp_client_connect_finish (GstRtmpClient * client, GAsyncResult * result, GError ** error) { GSimpleAsyncResult *simple; + gboolean ret; g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (client), gst_rtmp_client_connect_async), FALSE); simple = (GSimpleAsyncResult *) result; + ret = TRUE; if (g_simple_async_result_propagate_error (simple, error)) - return FALSE; + ret = FALSE; - return TRUE; + return ret; } GstRtmpConnection * diff --git a/rtmp/rtmpconnection.c b/rtmp/rtmpconnection.c index 88d2e20..837a45d 100644 --- a/rtmp/rtmpconnection.c +++ b/rtmp/rtmpconnection.c @@ -191,6 +191,8 @@ gst_rtmp_connection_finalize (GObject * object) GST_DEBUG_OBJECT (rtmpconnection, "finalize"); /* clean up object here */ + g_object_unref (rtmpconnection->cancellable); + g_queue_free_full (rtmpconnection->output_queue, g_object_unref); gst_rtmp_chunk_cache_free (rtmpconnection->input_chunk_cache); gst_rtmp_chunk_cache_free (rtmpconnection->output_chunk_cache); |