Fix various leaks

Fix some leaks.
This commit is contained in:
Wim Taymans 2009-01-30 17:06:26 +01:00
parent 27f069b43c
commit ae2521096a
3 changed files with 10 additions and 2 deletions

View file

@ -86,6 +86,7 @@ send_response (GstRTSPClient *client, GstRTSPMessage *response)
#endif
gst_rtsp_connection_send (client->connection, response, NULL);
gst_rtsp_message_unset (response);
}
static void
@ -496,6 +497,7 @@ handle_setup_request (GstRTSPClient *client, GstRTSPUrl *uri, GstRTSPMessage *re
/* serialize the server transport */
trans_str = gst_rtsp_transport_as_text (st);
gst_rtsp_transport_free (st);
/* construct the response now */
code = GST_RTSP_STS_OK;
@ -752,8 +754,12 @@ handle_client (GstRTSPClient *client)
/* ERRORS */
receive_failed:
{
gchar *str;
str = gst_rtsp_strresult (res);
g_message ("receive failed %d (%s), disconnect client %p", res,
gst_rtsp_strresult (res), client);
str, client);
g_free (str);
gst_rtsp_message_unset (&request);
gst_rtsp_connection_close (client->connection);
g_object_unref (client);
return NULL;

View file

@ -85,7 +85,8 @@ gst_rtsp_media_finalize (GObject * obj)
}
g_array_free (media->streams, TRUE);
gst_object_unref (media->pipeline);
if (media->pipeline)
gst_object_unref (media->pipeline);
G_OBJECT_CLASS (gst_rtsp_media_parent_class)->finalize (obj);
}

View file

@ -139,6 +139,7 @@ gst_rtsp_sdp_from_media (GstRTSPMedia *media)
g_string_free (fmtp, TRUE);
}
gst_sdp_message_add_media (sdp, smedia);
gst_sdp_media_free (smedia);
}
return sdp;