aboutsummaryrefslogtreecommitdiff
path: root/block/sheepdog.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/sheepdog.c')
-rw-r--r--block/sheepdog.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 4237132419..2a5bc0a59a 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1859,9 +1859,7 @@ out:
error_setg_errno(errp, -ret, "Can't pre-allocate");
}
out_with_err_set:
- if (blk) {
- blk_unref(blk);
- }
+ blk_unref(blk);
g_free(buf);
return ret;