mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
tree: Fix name
memory leak
Coverity points out that we have a memory leak from `g_strdup(name)`. `insert_child_mtree()` takes a const char * and duplicates it. `name` can be passed directly to `insert_child_mtree()`.
This commit is contained in:
parent
0ea7d2e326
commit
dc9eaef1e5
@ -452,7 +452,7 @@ ostree_mutable_tree_ensure_parent_dirs (OstreeMutableTree *self, GPtrArray *spli
|
|||||||
invalidate_contents_checksum (subdir);
|
invalidate_contents_checksum (subdir);
|
||||||
next = ostree_mutable_tree_new ();
|
next = ostree_mutable_tree_new ();
|
||||||
ostree_mutable_tree_set_metadata_checksum (next, metadata_checksum);
|
ostree_mutable_tree_set_metadata_checksum (next, metadata_checksum);
|
||||||
insert_child_mtree (subdir, g_strdup (name), next);
|
insert_child_mtree (subdir, name, next);
|
||||||
}
|
}
|
||||||
|
|
||||||
subdir = next;
|
subdir = next;
|
||||||
|
Loading…
Reference in New Issue
Block a user