s3:g_lock: avoid useless talloc_array(0) in g_lock_dump()
commitc75de325710c0fbbd50a0acd3af55404165440d6
authorStefan Metzmacher <metze@samba.org>
Thu, 18 Aug 2022 15:32:43 +0000 (18 17:32 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 19 Aug 2022 18:41:34 +0000 (19 18:41 +0000)
tree452af979564b91cbc7ce21581d1f399aa9cdf916
parentbb3dddcdf11e6c2f5319d64bf2ef20636d0ed82f
s3:g_lock: avoid useless talloc_array(0) in g_lock_dump()

In the common case we don't have any shared lock holders,
so there's no need to allocate memory for the empty array.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/g_lock.c