binaryregistry: don't crash in cleaning up on error.

Don't dereference NULL pointers.
This commit is contained in:
Stefan Kost 2009-09-11 21:20:57 +03:00
parent 61203b825f
commit 1949360f9b

View file

@ -794,10 +794,12 @@ fail_free_list:
for (walk = to_write; walk; walk = g_list_next (walk)) {
GstBinaryChunk *cur = walk->data;
if (cur) {
if (!(cur->flags & GST_BINARY_REGISTRY_FLAG_CONST))
g_free (cur->data);
g_free (cur);
}
}
g_list_free (to_write);
if (cache)