mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
binaryregistry: don't crash in cleaning up on error.
Don't dereference NULL pointers.
This commit is contained in:
parent
61203b825f
commit
1949360f9b
1 changed files with 5 additions and 3 deletions
|
@ -794,10 +794,12 @@ fail_free_list:
|
||||||
for (walk = to_write; walk; walk = g_list_next (walk)) {
|
for (walk = to_write; walk; walk = g_list_next (walk)) {
|
||||||
GstBinaryChunk *cur = walk->data;
|
GstBinaryChunk *cur = walk->data;
|
||||||
|
|
||||||
|
if (cur) {
|
||||||
if (!(cur->flags & GST_BINARY_REGISTRY_FLAG_CONST))
|
if (!(cur->flags & GST_BINARY_REGISTRY_FLAG_CONST))
|
||||||
g_free (cur->data);
|
g_free (cur->data);
|
||||||
g_free (cur);
|
g_free (cur);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
g_list_free (to_write);
|
g_list_free (to_write);
|
||||||
|
|
||||||
if (cache)
|
if (cache)
|
||||||
|
|
Loading…
Reference in a new issue