From: Jason Dillaman Date: Tue, 11 Aug 2015 18:38:59 +0000 (-0400) Subject: librados: don't provide an invalid watch handle on error X-Git-Tag: v10.0.1~102^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1acc688ad74e3af01127d5c0b3f00d00f351413d;p=ceph.git librados: don't provide an invalid watch handle on error If the linger op was canceled due to an error, don't provide the caller with the pointer to the invalidated linger op. Signed-off-by: Jason Dillaman --- diff --git a/src/librados/IoCtxImpl.cc b/src/librados/IoCtxImpl.cc index f12c9214a302..e36fac4c22d3 100644 --- a/src/librados/IoCtxImpl.cc +++ b/src/librados/IoCtxImpl.cc @@ -1235,6 +1235,7 @@ int librados::IoCtxImpl::watch(const object_t& oid, if (r < 0) { objecter->linger_cancel(linger_op); + *handle = 0; } return r;