From e7001f482e863b5daeb0984677fab1b7b7a88b71 Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Tue, 11 Jun 2013 11:01:21 +1000 Subject: Don't increment the data handle reference count if locking the handle fails. refs #574 --- src/conn/conn_dhandle.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conn/conn_dhandle.c b/src/conn/conn_dhandle.c index a02f3690bc3..0cbe9233c8c 100644 --- a/src/conn/conn_dhandle.c +++ b/src/conn/conn_dhandle.c @@ -104,10 +104,11 @@ __conn_dhandle_get(WT_SESSION_IMPL *session, ((ckpt == NULL && dhandle->checkpoint == NULL) || (ckpt != NULL && dhandle->checkpoint != NULL && strcmp(ckpt, dhandle->checkpoint) == 0))) { + WT_RET(__conn_dhandle_open_lock( + session, dhandle, flags)); ++dhandle->refcnt; session->dhandle = dhandle; - return (__conn_dhandle_open_lock( - session, dhandle, flags)); + return (0); } /* -- cgit v1.2.1