mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
gst/gstvalue.c: fix a leak if no flags are set
Original commit message from CVS: * gst/gstvalue.c: (gst_value_serialize_flags): fix a leak if no flags are set * tests/check/gst/gstvalue.c: (GST_START_TEST): fix leak in tests
This commit is contained in:
parent
4f89b26095
commit
46de58b721
3 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-05-10 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gstvalue.c: (gst_value_serialize_flags):
|
||||
fix a leak if no flags are set
|
||||
* tests/check/gst/gstvalue.c: (GST_START_TEST):
|
||||
fix leak in tests
|
||||
|
||||
2006-05-10 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* docs/manual/basics-pads.xml:
|
||||
|
|
|
@ -1919,7 +1919,6 @@ gst_value_serialize_flags (const GValue * value)
|
|||
|
||||
g_return_val_if_fail (klass, NULL);
|
||||
|
||||
result = g_strdup ("");
|
||||
flags = g_value_get_flags (value);
|
||||
|
||||
/* if no flags are set, try to serialize to the _NONE string */
|
||||
|
@ -1929,6 +1928,7 @@ gst_value_serialize_flags (const GValue * value)
|
|||
}
|
||||
|
||||
/* some flags are set, so serialize one by one */
|
||||
result = g_strdup ("");
|
||||
while (flags) {
|
||||
fl = gst_flags_get_first_value (klass, flags);
|
||||
if (fl != NULL) {
|
||||
|
|
|
@ -345,6 +345,7 @@ GST_START_TEST (test_serialize_flags)
|
|||
fail_if (string == NULL, "could not serialize flags %d", i);
|
||||
fail_unless (strcmp (string, results[i]) == 0,
|
||||
"resulting value is %s, not %s, for flags #%d", string, results[i], i);
|
||||
g_free (string);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue