mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
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. (sorry for committing wrong fix before).
This commit is contained in:
parent
4faa75ab35
commit
158895f56b
1 changed files with 3 additions and 9 deletions
|
@ -766,10 +766,6 @@ gst_registry_binary_write_cache (GstRegistry * registry, const char *location)
|
|||
|
||||
if (!gst_registry_binary_write_chunk (registry, cache, cur->data, cur->size,
|
||||
&file_position, cur->align)) {
|
||||
if (!(cur->flags & GST_BINARY_REGISTRY_FLAG_CONST))
|
||||
g_free (cur->data);
|
||||
g_free (cur);
|
||||
walk->data = NULL;
|
||||
goto fail_free_list;
|
||||
}
|
||||
if (!(cur->flags & GST_BINARY_REGISTRY_FLAG_CONST))
|
||||
|
@ -790,12 +786,10 @@ 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)
|
||||
|
|
Loading…
Reference in a new issue