qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: Fix leak of ignore_children in error pat


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] block: Fix leak of ignore_children in error path
Date: Thu, 15 Mar 2018 07:25:30 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/14/2018 10:51 PM, Fam Zheng wrote:
Reported-by: Max Reitz <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
---
  block.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <address@hidden>


diff --git a/block.c b/block.c
index 75a9fd49de..c1fda9fd57 100644
--- a/block.c
+++ b/block.c
@@ -3671,12 +3671,12 @@ int bdrv_drop_intermediate(BlockDriverState *top, 
BlockDriverState *base,
          GSList *ignore_children = g_slist_prepend(NULL, c);
          bdrv_check_update_perm(base, NULL, c->perm, c->shared_perm,
                                 ignore_children, &local_err);
+        g_slist_free(ignore_children);
          if (local_err) {
              ret = -EPERM;
              error_report_err(local_err);
              goto exit;
          }
-        g_slist_free(ignore_children);
/* If so, update the backing file path in the image file */
          if (c->role->update_filename) {


--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]