r20983: Two no-mem error returns
authorVolker Lendecke <vlendec@samba.org>
Tue, 23 Jan 2007 20:57:50 +0000 (20:57 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:44:17 +0000 (14:44 -0500)
source/ntvfs/common/notify.c

index 5954a7ebe2a39aa14eec53ba65a1ae2a668c24c6..91fa8a1d78996bfc466656394d56b97570cfc883 100644 (file)
@@ -213,6 +213,7 @@ static NTSTATUS notify_save(struct notify_context *notify)
        }
 
        tmp_ctx = talloc_new(notify);
+       NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);
 
        status = ndr_push_struct_blob(&blob, tmp_ctx, notify->array, 
                                      (ndr_push_flags_fn_t)ndr_push_notify_array);
@@ -246,6 +247,10 @@ static void notify_handler(struct messaging_context *msg_ctx, void *private_data
        TALLOC_CTX *tmp_ctx = talloc_new(notify);
        struct notify_list *listel;
 
+       if (tmp_ctx == NULL) {
+               return;
+       }
+
        status = ndr_pull_struct_blob(data, tmp_ctx, &ev, 
                                      (ndr_pull_flags_fn_t)ndr_pull_notify_event);
        if (!NT_STATUS_IS_OK(status)) {