summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-05-22 23:10:00 +0300
committerStefan Kost <ensonic@users.sf.net>2009-05-22 23:10:00 +0300
commit4faa75ab35600ab365d092fde9821457a89871e4 (patch)
tree6988d08828c1bfd1c512e7a8ee2060ffcc48294d
parent04ece698383f034a31f2c23ba518d5ad02725028 (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.c8
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);