]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
krbd: match new with delete, not free()
authorIlya Dryomov <ilya.dryomov@inktank.com>
Thu, 8 May 2014 14:17:48 +0000 (18:17 +0400)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Thu, 8 May 2014 14:17:48 +0000 (18:17 +0400)
struct krbd_ctx is allocated with new, use delete to get rid of it.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
src/krbd.cc

index f09a9f09acd6cfb956d8cd275c4e12557f1caeed..9ac413718136b1b4979afe9931ea19ec28e0fc8b 100644 (file)
@@ -581,7 +581,7 @@ extern "C" int krbd_create_from_context(struct CephContext *cct,
   ctx->cct = cct;
   ctx->udev = udev_new();
   if (!ctx->udev) {
-    free(ctx);
+    delete ctx;
     return -ENOMEM;
   }