summaryrefslogtreecommitdiffstats
path: root/ext/neon
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-12-12 16:10:21 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-12-12 16:10:21 +0000
commitd3c0b705eb74d4f33d8232ae6e67c842ea54bd30 (patch)
tree03bddb28fd23b7471e5f85f6dd41a4b636b6d8cb /ext/neon
parent9e71250a69ece783fddcc98d0a324b02d4c4e0ac (diff)
downloadgst-plugins-bad-d3c0b705eb74d4f33d8232ae6e67c842ea54bd30.tar.gz
gst-plugins-bad-d3c0b705eb74d4f33d8232ae6e67c842ea54bd30.tar.bz2
gst-plugins-bad-d3c0b705eb74d4f33d8232ae6e67c842ea54bd30.zip
ext/neon/gstneonhttpsrc.c: Fix minor mem leak in redirect code.
Original commit message from CVS: * ext/neon/gstneonhttpsrc.c: (gst_neonhttp_src_create), (send_request_and_redirect): Fix minor mem leak in redirect code. * tests/check/Makefile.am: * tests/check/elements/.cvsignore: * tests/check/elements/neonhttpsrc.c: (handoff_cb), (GST_START_TEST), (neonhttpsrc_suite): * tests/check/gst-plugins-bad.supp: Add super-basic unit test for #384140.
Diffstat (limited to 'ext/neon')
-rw-r--r--ext/neon/gstneonhttpsrc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/neon/gstneonhttpsrc.c b/ext/neon/gstneonhttpsrc.c
index 5c747139..5777dbb4 100644
--- a/ext/neon/gstneonhttpsrc.c
+++ b/ext/neon/gstneonhttpsrc.c
@@ -344,6 +344,8 @@ gst_neonhttp_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
if (G_UNLIKELY (read < 0))
goto read_error;
+ GST_LOG_OBJECT (src, "returning %u bytes", GST_BUFFER_SIZE (*outbuf));
+
done:
return ret;
@@ -411,8 +413,6 @@ send_request_and_redirect (GstNeonhttpSrc * src, gboolean do_redir)
gint res;
gint http_status = 0;
- const gchar *redir = g_strdup ("");
-
guint request_count = 0;
#ifndef GST_DISABLE_GST_DEBUG
@@ -454,6 +454,8 @@ send_request_and_redirect (GstNeonhttpSrc * src, gboolean do_redir)
* Reload the HTTP request with a new URI value */
http_status = ne_get_status (src->request)->code;
if (http_status == 302) {
+ const gchar *redir;
+
/* the new URI value to go when redirecting can be found on the 'Location' HTTP header */
redir = ne_get_response_header (src->request, "Location");
if (redir != NULL) {