projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0aace5a
)
v4l2sink: Protect against NULL-pointer access
author
IOhannes m zmölnig
<zmoelnig@iem.at>
Thu, 30 Sep 2010 13:28:23 +0000
(15:28 +0200)
committer
Sebastian Dröge
<sebastian.droege@collabora.co.uk>
Sun, 10 Oct 2010 09:23:39 +0000
(11:23 +0200)
gst_v4l2sink_change_state() would free the pool without checking whether there
was a valid pool...
sys/v4l2/gstv4l2sink.c
patch
|
blob
|
history
diff --git
a/sys/v4l2/gstv4l2sink.c
b/sys/v4l2/gstv4l2sink.c
index 679f7e2903c33bbdefbe2f5a3daba66fc9b04675..7dc13829334c7630e6a1c7d254160c4b75cf942b 100644
(file)
--- a/
sys/v4l2/gstv4l2sink.c
+++ b/
sys/v4l2/gstv4l2sink.c
@@
-461,7
+461,8
@@
gst_v4l2sink_change_state (GstElement * element, GstStateChange transition)
}
break;
case GST_STATE_CHANGE_READY_TO_NULL:
- gst_v4l2_buffer_pool_destroy (v4l2sink->pool);
+ if (NULL != v4l2sink->pool)
+ gst_v4l2_buffer_pool_destroy (v4l2sink->pool);
v4l2sink->pool = NULL;
/* close the device */
if (!gst_v4l2_object_stop (v4l2sink->v4l2object))