34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
From: Colin Walters <walters@verbum.org>
|
|
Date: Mon, 28 Nov 2016 21:12:23 -0500
|
|
Subject: [ASAN] deltas: Fix minor memory leak
|
|
|
|
We were leaking the checksum, ensure we free it in both normal and
|
|
error paths.
|
|
|
|
Closes: #598
|
|
Approved by: jlebon
|
|
---
|
|
src/libostree/ostree-repo-static-delta-processing.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/src/libostree/ostree-repo-static-delta-processing.c b/src/libostree/ostree-repo-static-delta-processing.c
|
|
index eabe392..ff5a8a1 100644
|
|
--- a/src/libostree/ostree-repo-static-delta-processing.c
|
|
+++ b/src/libostree/ostree-repo-static-delta-processing.c
|
|
@@ -286,6 +286,7 @@ _ostree_static_delta_part_execute (OstreeRepo *repo,
|
|
|
|
ret = TRUE;
|
|
out:
|
|
+ g_clear_pointer (&state->content_checksum, g_checksum_free);
|
|
return ret;
|
|
}
|
|
|
|
@@ -941,6 +942,7 @@ dispatch_close (OstreeRepo *repo,
|
|
goto out;
|
|
|
|
g_clear_pointer (&state->xattrs, g_variant_unref);
|
|
+ g_clear_pointer (&state->content_checksum, g_checksum_free);
|
|
g_clear_object (&state->content_out);
|
|
|
|
state->checksum_index++;
|