From 1b20904032571d03af70210d9f679bca9f359dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Wed, 21 Sep 2011 04:16:27 -0700 Subject: [PATCH] Bug #820: Execute the ALLOCATE hooks only if the allocation is successful --- src/pool/PoolSQL.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pool/PoolSQL.cc b/src/pool/PoolSQL.cc index 175db7be9f..d615d9dce0 100644 --- a/src/pool/PoolSQL.cc +++ b/src/pool/PoolSQL.cc @@ -122,10 +122,9 @@ int PoolSQL::allocate( else { rc = lastOID; + do_hooks(objsql, Hook::ALLOCATE); } - do_hooks(objsql, Hook::ALLOCATE); - objsql->unlock(); delete objsql;