projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbb2532
)
lib/pull: Fix minor memleak in error path
author
Colin Walters
<walters@verbum.org>
Thu, 19 Jul 2018 12:46:23 +0000
(12:46 +0000)
committer
Atomic Bot
<atomic-devel@projectatomic.io>
Fri, 20 Jul 2018 20:32:17 +0000
(20:32 +0000)
Spotted by a downstream Coverity build.
Closes: #1684
Approved by: jlebon
src/libostree/ostree-repo-pull.c
patch
|
blob
|
history
diff --git
a/src/libostree/ostree-repo-pull.c
b/src/libostree/ostree-repo-pull.c
index 9553272e854fbd3c70bc27914412d126306138f9..a8fee07633b25aeccc2176b612029eec2425daba 100644
(file)
--- a/
src/libostree/ostree-repo-pull.c
+++ b/
src/libostree/ostree-repo-pull.c
@@
-4131,7
+4131,6
@@
ostree_repo_pull_with_options (OstreeRepo *self,
{
const char *delta;
g_autoptr(GVariant) csum_v = NULL;
- guchar *csum_data = g_malloc (OSTREE_SHA256_DIGEST_LEN);
g_autoptr(GVariant) ref = g_variant_get_child_value (deltas, i);
g_variant_get_child (ref, 0, "&s", &delta);
@@
-4140,6
+4139,7
@@
ostree_repo_pull_with_options (OstreeRepo *self,
if (!validate_variant_is_csum (csum_v, error))
goto out;
+ guchar *csum_data = g_malloc (OSTREE_SHA256_DIGEST_LEN);
memcpy (csum_data, ostree_checksum_bytes_peek (csum_v), 32);
g_hash_table_insert (pull_data->summary_deltas_checksums,
g_strdup (delta),