From 0f795cae3f4f41bf07c9569de3ae9998ff744e2e Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 24 Feb 2017 09:14:24 -0500 Subject: [PATCH] daemon: Squash a memleak of parent commit Closes: #644 Approved by: jlebon --- src/daemon/rpmostreed-deployment-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon/rpmostreed-deployment-utils.c b/src/daemon/rpmostreed-deployment-utils.c index b6c3f046..8abd5e8d 100644 --- a/src/daemon/rpmostreed-deployment-utils.c +++ b/src/daemon/rpmostreed-deployment-utils.c @@ -169,7 +169,7 @@ rpmostreed_deployment_generate_variant (OstreeDeployment *deployment, g_autoptr(GVariant) commit = NULL; g_autoptr(RpmOstreeOrigin) origin = NULL; g_autofree gchar *id = NULL; - const char *base_checksum; + g_autofree char *base_checksum = NULL; GVariant *sigs = NULL; /* floating variant */ @@ -212,7 +212,7 @@ rpmostreed_deployment_generate_variant (OstreeDeployment *deployment, } else { - base_checksum = csum; + base_checksum = g_strdup (csum); } sigs = rpmostreed_deployment_gpg_results (repo, refspec, base_checksum, &gpg_enabled); variant_add_commit_details (&dict, NULL, commit);