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:
a064590
)
gltestsrc: Fix potential NULL pointer dereference if we fail without GError
author
Sebastian Dröge
<sebastian@centricular.com>
Tue, 28 Feb 2017 13:22:43 +0000
(15:22 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Tue, 28 Feb 2017 13:23:55 +0000
(15:23 +0200)
Which can happen here if we just propagate an error that happened
elsewhere, e.g. FBO failed.
CID 1364604
ext/gl/gstgltestsrc.c
patch
|
blob
|
history
diff --git
a/ext/gl/gstgltestsrc.c
b/ext/gl/gstgltestsrc.c
index
51c709d
..
83218b4
100644
(file)
--- a/
ext/gl/gstgltestsrc.c
+++ b/
ext/gl/gstgltestsrc.c
@@
-675,9
+675,13
@@
unsupported_gl_api:
}
context_error:
{
- GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, ("%s", error->message),
- (NULL));
- g_clear_error (&error);
+ if (error) {
+ GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, ("%s", error->message),
+ (NULL));
+ g_clear_error (&error);
+ } else {
+ GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (NULL), (NULL));
+ }
if (src->context)
gst_object_unref (src->context);
src->context = NULL;