mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
Fix various leaks
Fix some leaks.
This commit is contained in:
parent
27f069b43c
commit
ae2521096a
3 changed files with 10 additions and 2 deletions
|
@ -86,6 +86,7 @@ send_response (GstRTSPClient *client, GstRTSPMessage *response)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gst_rtsp_connection_send (client->connection, response, NULL);
|
gst_rtsp_connection_send (client->connection, response, NULL);
|
||||||
|
gst_rtsp_message_unset (response);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -496,6 +497,7 @@ handle_setup_request (GstRTSPClient *client, GstRTSPUrl *uri, GstRTSPMessage *re
|
||||||
|
|
||||||
/* serialize the server transport */
|
/* serialize the server transport */
|
||||||
trans_str = gst_rtsp_transport_as_text (st);
|
trans_str = gst_rtsp_transport_as_text (st);
|
||||||
|
gst_rtsp_transport_free (st);
|
||||||
|
|
||||||
/* construct the response now */
|
/* construct the response now */
|
||||||
code = GST_RTSP_STS_OK;
|
code = GST_RTSP_STS_OK;
|
||||||
|
@ -752,8 +754,12 @@ handle_client (GstRTSPClient *client)
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
receive_failed:
|
receive_failed:
|
||||||
{
|
{
|
||||||
|
gchar *str;
|
||||||
|
str = gst_rtsp_strresult (res);
|
||||||
g_message ("receive failed %d (%s), disconnect client %p", 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);
|
gst_rtsp_connection_close (client->connection);
|
||||||
g_object_unref (client);
|
g_object_unref (client);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -85,7 +85,8 @@ gst_rtsp_media_finalize (GObject * obj)
|
||||||
}
|
}
|
||||||
g_array_free (media->streams, TRUE);
|
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);
|
G_OBJECT_CLASS (gst_rtsp_media_parent_class)->finalize (obj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,6 +139,7 @@ gst_rtsp_sdp_from_media (GstRTSPMedia *media)
|
||||||
g_string_free (fmtp, TRUE);
|
g_string_free (fmtp, TRUE);
|
||||||
}
|
}
|
||||||
gst_sdp_message_add_media (sdp, smedia);
|
gst_sdp_message_add_media (sdp, smedia);
|
||||||
|
gst_sdp_media_free (smedia);
|
||||||
}
|
}
|
||||||
|
|
||||||
return sdp;
|
return sdp;
|
||||||
|
|
Loading…
Reference in a new issue