From 9a137311f129c795897c2633aab95c47db7b5903 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 26 Aug 2011 16:05:46 +1000 Subject: s4-messaging ensure we do not segfault on a NULL msg context in cleanup --- source4/lib/messaging/messaging.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/lib') diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 4a4adac16f..7e017a97f9 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -545,6 +545,10 @@ NTSTATUS imessaging_send_ptr(struct imessaging_context *msg, struct server_id se */ int imessaging_cleanup(struct imessaging_context *msg) { + if (!msg) { + return 0; + } + DEBUG(5,("imessaging: cleaning up %s\n", msg->path)); unlink(msg->path); while (msg->names && msg->names[0]) { -- cgit