aboutsummaryrefslogtreecommitdiff
path: root/block/sheepdog.c
diff options
context:
space:
mode:
authorzhanghailiang <zhang.zhanghailiang@huawei.com>2015-05-05 09:48:03 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2015-05-08 14:11:10 +0300
commit973a8529c54f9e4410a0e4a18ca1dcb2b085ca7e (patch)
tree14451968ad021cda1f57598bad327ad32f085868 /block/sheepdog.c
parente5a88b0cf3c902d6e9b342a90f0a4a4d5d954f7a (diff)
sheepdog: fix resource leak with sd_snapshot_create
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'block/sheepdog.c')
-rw-r--r--block/sheepdog.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 2d5f06a390..bd7cbed048 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -2341,6 +2341,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
if (ret < 0) {
error_report("failed to create inode for snapshot: %s",
error_get_pretty(local_err));
+ error_free(local_err);
goto cleanup;
}