summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-26 16:05:46 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-26 14:06:07 +0200
commit9a137311f129c795897c2633aab95c47db7b5903 (patch)
tree7b7b4f3c75eebfb2da16b9d53effa80c02e40730 /source4/lib
parent1f181476b4bd27dda9823e99961c4954ad968244 (diff)
downloadsamba-9a137311f129c795897c2633aab95c47db7b5903.tar.gz
samba-9a137311f129c795897c2633aab95c47db7b5903.tar.bz2
samba-9a137311f129c795897c2633aab95c47db7b5903.zip
s4-messaging ensure we do not segfault on a NULL msg context in cleanup
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/messaging/messaging.c4
1 files changed, 4 insertions, 0 deletions
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]) {