[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v6 08.5/15] fixup! qstring: Add qstring_wrap_str()
From: |
Eric Blake |
Subject: |
[Qemu-block] [PATCH v6 08.5/15] fixup! qstring: Add qstring_wrap_str() |
Date: |
Tue, 11 Oct 2016 10:24:45 -0500 |
Signed-off-by: Eric Blake <address@hidden>
---
squash this in to address Marc-Andre's finding on a harmless
extra g_free.
---
block.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/block.c b/block.c
index 16d5981..6f00fd4 100644
--- a/block.c
+++ b/block.c
@@ -1605,7 +1605,7 @@ static BlockDriverState
*bdrv_append_temp_snapshot(BlockDriverState *bs,
char *tmp_filename = g_malloc0(PATH_MAX + 1);
int64_t total_size;
QemuOpts *opts = NULL;
- BlockDriverState *bs_snapshot;
+ BlockDriverState *bs_snapshot = NULL;
int ret;
/* if snapshot, we create a temporary backing file and open it
@@ -1658,13 +1658,10 @@ static BlockDriverState
*bdrv_append_temp_snapshot(BlockDriverState *bs,
bdrv_ref(bs_snapshot);
bdrv_append(bs_snapshot, bs);
+out:
+ QDECREF(snapshot_options);
g_free(tmp_filename);
return bs_snapshot;
-
-out:
- QDECREF(snapshot_options);
- g_free(tmp_filename);
- return NULL;
}
/*
--
2.7.4