Commit 92e2c686 authored by Benjamin Otte's avatar Benjamin Otte

gst/gstevent.c: actually break; inside the switch statement

Original commit message from CVS:
2004-02-04  Benjamin Otte  <in7y118@public.uni-hamburg.de>

* gst/gstevent.c: (_gst_event_free):
actually break; inside the switch statement
* gst/parse/grammar.y:
fix memleak where GValues weren't unset
parent 3945b060
2004-02-04 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/gstevent.c: (_gst_event_free):
actually break; inside the switch statement
* gst/parse/grammar.y:
fix memleak where GValues weren't unset
2004-02-03 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/gststructure.c: (gst_structure_from_string):
......
......@@ -93,8 +93,10 @@ _gst_event_free (GstEvent* event)
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_TAG:
gst_tag_list_free (event->event_data.structure.structure);
break;
case GST_EVENT_NAVIGATION:
gst_structure_free (event->event_data.structure.structure);
break;
default:
break;
}
......
......@@ -223,6 +223,8 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
{
GParamSpec *pspec;
gchar *pos = value;
GValue v = { 0, };
GValue v2 = { 0, };
/* parse the string, so the property name is null-terminated an pos points
to the beginning of the value */
while (!g_ascii_isspace (*pos) && (*pos != '=')) pos++;
......@@ -241,8 +243,6 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
}
gst_parse_unescape (pos);
if ((pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (element), value))) {
GValue v = { 0, };
GValue v2 = { 0, };
g_value_init (&v, G_PARAM_SPEC_VALUE_TYPE(pspec));
switch (G_TYPE_FUNDAMENTAL (G_PARAM_SPEC_VALUE_TYPE (pspec))) {
case G_TYPE_STRING:
......@@ -320,6 +320,10 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
out:
gst_parse_strfree (value);
if (G_IS_VALUE (&v))
g_value_unset (&v);
if (G_IS_VALUE (&v2))
g_value_unset (&v2);
return;
error:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment