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:
e739072
)
caps: Don't leak features on error cases
author
Edward Hervey
<bilboed@bilboed.com>
Mon, 12 May 2014 14:59:29 +0000
(16:59 +0200)
committer
Edward Hervey
<bilboed@bilboed.com>
Mon, 12 May 2014 14:59:29 +0000
(16:59 +0200)
If we fail to parse fields, we would end up leaking the features we
parsed just before
CID #1212152
gst/gstcaps.c
patch
|
blob
|
history
diff --git
a/gst/gstcaps.c
b/gst/gstcaps.c
index
c315e71
..
b729b79
100644
(file)
--- a/
gst/gstcaps.c
+++ b/
gst/gstcaps.c
@@
-2299,12
+2299,15
@@
gst_caps_from_string_inplace (GstCaps * caps, const gchar * string)
if (!priv_gst_structure_parse_fields (s, &s, structure)) {
gst_structure_free (structure);
+ if (features)
+ gst_caps_features_free (features);
g_free (copy);
return FALSE;
}
append:
gst_caps_append_structure_unchecked (caps, structure, features);
+ features = NULL;
if (*s == '\0')
break;
} while (TRUE);