projects
/
platform
/
upstream
/
gst-plugins-good.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
627109c
)
udpsrc: on receive error only unmap and unref buffer if one was alloced and mapped
author
Tim-Philipp Müller
<tim@centricular.com>
Thu, 19 Dec 2013 16:50:10 +0000
(16:50 +0000)
committer
Tim-Philipp Müller
<tim@centricular.com>
Thu, 19 Dec 2013 20:35:03 +0000
(20:35 +0000)
coverity CID 1139866.
gst/udp/gstudpsrc.c
patch
|
blob
|
history
diff --git
a/gst/udp/gstudpsrc.c
b/gst/udp/gstudpsrc.c
index
922e381
..
c2cbd92
100644
(file)
--- a/
gst/udp/gstudpsrc.c
+++ b/
gst/udp/gstudpsrc.c
@@
-390,7
+390,7
@@
gst_udpsrc_create (GstPushSrc * psrc, GstBuffer ** buf)
{
GstFlowReturn ret;
GstUDPSrc *udpsrc;
- GstBuffer *outbuf;
+ GstBuffer *outbuf
= NULL
;
GstMapInfo info;
GSocketAddress *saddr = NULL;
gsize offset;
@@
-555,8
+555,10
@@
alloc_failed:
}
receive_error:
{
- gst_buffer_unmap (outbuf, &info);
- gst_buffer_unref (outbuf);
+ if (outbuf != NULL) {
+ gst_buffer_unmap (outbuf, &info);
+ gst_buffer_unref (outbuf);
+ }
if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_BUSY) ||
g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {