]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: IoCtx destructor should put reference only if initalized
authorYehuda Sadeh <yehuda.sadeh@dreamhost.com>
Tue, 1 Mar 2011 23:18:40 +0000 (15:18 -0800)
committerYehuda Sadeh <yehuda.sadeh@dreamhost.com>
Tue, 1 Mar 2011 23:19:20 +0000 (15:19 -0800)
src/librados.cc

index d76061162106413580a0f144bebc0300f7a1388d..ec75e3f1697ce605a72516508f26a27665aee436 100644 (file)
@@ -2013,7 +2013,8 @@ operator=(const IoCtx& rhs)
 librados::IoCtx::
 ~IoCtx()
 {
-  io_ctx_impl->put();
+  if (io_ctx_impl)
+    io_ctx_impl->put();
   io_ctx_impl = 0;
 }