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>
master
zhanghailiang 2015-05-05 09:48:03 +08:00 committed by Michael Tokarev
parent e5a88b0cf3
commit 973a8529c5
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}