souphttpclientsink: Check if soup message is created

If soup message is not created then the same should not be passed
on, which is resulting in segfault. Hence throwing a warning message
and returning

https://bugzilla.gnome.org/show_bug.cgi?id=755326
This commit is contained in:
Vineeth TM 2015-10-12 11:18:51 +09:00 committed by Sebastian Dröge
parent 2ee7b2b94d
commit 6eb8db8afd

View file

@ -658,6 +658,15 @@ send_message_locked (GstSoupHttpClientSink * souphttpsink)
}
souphttpsink->message = soup_message_new ("PUT", souphttpsink->location);
if (souphttpsink->message == NULL) {
GST_WARNING_OBJECT (souphttpsink,
"URI could not be parsed while creating message.");
g_list_free_full (souphttpsink->queued_buffers,
(GDestroyNotify) gst_buffer_unref);
souphttpsink->queued_buffers = NULL;
return;
}
soup_message_set_flags (souphttpsink->message,
(souphttpsink->automatic_redirect ? 0 : SOUP_MESSAGE_NO_REDIRECT));