diff options
author | Stefan Kost <ensonic@users.sf.net> | 2009-05-22 23:10:00 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-05-22 23:10:00 +0300 |
commit | 4faa75ab35600ab365d092fde9821457a89871e4 (patch) | |
tree | 6988d08828c1bfd1c512e7a8ee2060ffcc48294d | |
parent | 04ece698383f034a31f2c23ba518d5ad02725028 (diff) |
registry: don't free node-date and deref again. Fixes #580579
When writing a cache chunk fails, we were freeing the node and jump to a final
cleanup which dereferenced a null pointer. Leve freeing the node to the cleanup
code in fail_free_list.
-rw-r--r-- | gst/gstregistrybinary.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gst/gstregistrybinary.c b/gst/gstregistrybinary.c index fa560895ea..bafa662399 100644 --- a/gst/gstregistrybinary.c +++ b/gst/gstregistrybinary.c @@ -790,9 +790,11 @@ fail_free_list: for (walk = to_write; walk; walk = g_list_next (walk)) { GstBinaryChunk *cur = walk->data; - if (!(cur->flags & GST_BINARY_REGISTRY_FLAG_CONST)) - g_free (cur->data); - g_free (cur); + if (cur) { + if (!(cur->flags & GST_BINARY_REGISTRY_FLAG_CONST)) + g_free (cur->data); + g_free (cur); + } } g_list_free (to_write); |