summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rbd.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rbd.cc b/src/rbd.cc
index 044442eb33b..79860c2d772 100644
--- a/src/rbd.cc
+++ b/src/rbd.cc
@@ -1301,7 +1301,7 @@ static int do_import(librbd::RBD &rbd, librados::IoCtx& io_ctx,
if (fd < 0) {
r = -errno;
cerr << "rbd: error opening " << path << std::endl;
- return r;
+ goto done2;
}
r = fstat(fd, &stat_buf);
@@ -1394,7 +1394,8 @@ static int do_import(librbd::RBD &rbd, librados::IoCtx& io_ctx,
pc.finish();
close(fd);
}
-
+ done2:
+ delete[] p;
return r;
}