mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
curlhttpsink: free content type before assigning it
Not doing this would result in a memory leak.
This commit is contained in:
parent
e8ec1c0143
commit
d49bc71f00
1 changed files with 1 additions and 0 deletions
|
@ -463,6 +463,7 @@ gst_curl_http_sink_set_mime_type (GstCurlBaseSink * bcsink, GstCaps * caps)
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
structure = gst_caps_get_structure (caps, 0);
|
||||||
mime_type = gst_structure_get_name (structure);
|
mime_type = gst_structure_get_name (structure);
|
||||||
|
|
||||||
|
g_free (sink->content_type);
|
||||||
if (!g_strcmp0 (mime_type, "multipart/form-data") &&
|
if (!g_strcmp0 (mime_type, "multipart/form-data") &&
|
||||||
gst_structure_has_field_typed (structure, "boundary", G_TYPE_STRING)) {
|
gst_structure_has_field_typed (structure, "boundary", G_TYPE_STRING)) {
|
||||||
const gchar *boundary;
|
const gchar *boundary;
|
||||||
|
|
Loading…
Reference in a new issue