Skip to content

Commit 465bcaa

Browse files
committed
Avoid possible nil pointer dereference if a poll is created with nil clients.
1 parent 346f114 commit 465bcaa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

SQLClientPool.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,10 @@ - (BOOL) _swallowClient: (SQLClient*)client explicit: (BOOL)swallowed
885885
* caused by deallocation.
886886
*/
887887
_items[index].u = 0;
888-
NSIncrementExtraRefCount(client);
888+
if (client)
889+
{
890+
NSIncrementExtraRefCount(client);
891+
}
889892
}
890893
else
891894
{

0 commit comments

Comments
 (0)