[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
This commit is contained in:
1 parent
79cb421ee2
commit
ab0400b722
1 file changed
+2
@@ -286,6 +286,7 @@ _ostree_static_delta_part_execute (OstreeRepo *repo,
|
|||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
|
g_clear_pointer (&state->content_checksum, g_checksum_free);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -941,6 +942,7 @@ dispatch_close (OstreeRepo *repo,
|
|||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
g_clear_pointer (&state->xattrs, g_variant_unref);
|
g_clear_pointer (&state->xattrs, g_variant_unref);
|
||||||
|
g_clear_pointer (&state->content_checksum, g_checksum_free);
|
||||||
g_clear_object (&state->content_out);
|
g_clear_object (&state->content_out);
|
||||||
|
|
||||||
state->checksum_index++;
|
state->checksum_index++;
|
||||||
|
|||||||
Reference in new issue
Block a user