The static analyzer has detected NULL_AFTER_DEREF: Pointer 'data', which is dereferenced at partition.c:1165, is compared to a NULL value at partition.c:1176. Seems that it's better to move 'if (data)' to partition.c:1165 in the following way: 'if (data && data->in_transaction == 0)' or get rid of this code at partition.c:1176 by replacing it with 'if (data->partitions)'. Otherwise, this condition allows NULL-dereference at partition.c:1165, or it's just a dead code. GitHub: 1) partition.c:1176 https://github.com/samba-team/samba/blob/225a003a043eee399b6d266d94440c399b6877e4/source4/dsdb/samdb/ldb_modules/partition.c#L1176 2) partition.c:1165 https://github.com/samba-team/samba/blob/225a003a043eee399b6d266d94440c399b6877e4/source4/dsdb/samdb/ldb_modules/partition.c#L1165 Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE. Author E. Bykhanova (e.bykhanova@fobos-nt.ru).