s3:locking: Add missing NULL check
authorAndreas Schneider <asn@samba.org>
Mon, 4 Feb 2019 16:19:55 +0000 (17:19 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 12 Feb 2019 22:02:07 +0000 (23:02 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/locking/locking.c

index ae5f0bbcf339f300eb7b1f608c3049d05bf78e2b..d4c3b32be7f60aaab881931c746dd7788921b3cb 100644 (file)
@@ -150,6 +150,9 @@ bool strict_lock_check_default(files_struct *fsp, struct lock_struct *plock)
                 * autocleanup. This is the slow path anyway.
                 */
                br_lck = brl_get_locks(talloc_tos(), fsp);
+               if (br_lck == NULL) {
+                       return true;
+               }
                ret = brl_locktest(br_lck, plock);
                TALLOC_FREE(br_lck);
        }