Explicitly require event context to be specified.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 16 Apr 2008 23:19:53 +0000 (01:19 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 16 Apr 2008 23:19:53 +0000 (01:19 +0200)
(This used to be commit a95a71fe45ef6a578569931a7c38061783d07db3)

source4/ntvfs/common/notify.c
source4/ntvfs/sysdep/sys_notify.c

index 23aa3fb6687290de637a9941ff64d4b6eb9357af..9055d6ece330304cde63b80a0da369b8d35f9fcc 100644 (file)
@@ -93,6 +93,10 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
                return NULL;
        }
 
+       if (ev == NULL) {
+               return NULL;
+       }
+
        notify = talloc(mem_ctx, struct notify_context);
        if (notify == NULL) {
                return NULL;
index eb5cc3793f65bfd56a54e4c162b43e7d625f260c..22b72c4d634ca54258ea27245b5186a2db5b6b7d 100644 (file)
@@ -52,7 +52,7 @@ _PUBLIC_ struct sys_notify_context *sys_notify_context_create(struct share_confi
        }
 
        if (ev == NULL) {
-               ev = event_context_find(mem_ctx);
+               return NULL;
        }
 
        ctx = talloc_zero(mem_ctx, struct sys_notify_context);