diff options
Diffstat (limited to 'storage')
-rw-r--r-- | storage/ndb/src/kernel/vm/Pool.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/ndb/src/kernel/vm/Pool.hpp b/storage/ndb/src/kernel/vm/Pool.hpp index b585af57684..a4e062078fb 100644 --- a/storage/ndb/src/kernel/vm/Pool.hpp +++ b/storage/ndb/src/kernel/vm/Pool.hpp @@ -307,8 +307,11 @@ RecordPool<T, P>::seize(Ptr<T> & ptr) { Ptr<void> tmp; bool ret = m_pool.seize(tmp); - ptr.i = tmp.i; - ptr.p = static_cast<T*>(tmp.p); + if(likely(ret)) + { + ptr.i = tmp.i; + ptr.p = static_cast<T*>(tmp.p); + } return ret; } |