]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Fix Coverity ID 2747: FORWARD_NULL
authorVolker Lendecke <vl@samba.org>
Thu, 19 Apr 2012 08:20:27 +0000 (10:20 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 19 Apr 2012 15:37:37 +0000 (17:37 +0200)
For the notify cleanup process we have a notify context without a
messaging entry. We will never call notify_add/remove for this, but
the code should protect against this.

source3/smbd/notify_internal.c

index 27fe21214b303ba3dcb684df3ff6f5c0ad3c88a2..aa02e32a2f134c47da1047c694fb2a9b0048d2bb 100644 (file)
@@ -393,7 +393,7 @@ NTSTATUS notify_remove(struct notify_context *notify, void *private_data)
        struct db_record *notify_rec;
        NTSTATUS status;
 
-       if (notify == NULL) {
+       if ((notify == NULL) || (notify->msg == NULL)) {
                return NT_STATUS_NOT_IMPLEMENTED;
        }