summaryrefslogtreecommitdiff
path: root/source3/lib/messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/messages.c')
-rw-r--r--source3/lib/messages.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 5ff0e45c61..c078472880 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -315,7 +315,9 @@ static BOOL retrieve_all_messages(char **msgs_buf, size_t *total_len)
kbuf = message_key_pid(sys_getpid());
- tdb_chainlock(tdb, kbuf);
+ if (tdb_chainlock(tdb, kbuf) == -1)
+ return False;
+
dbuf = tdb_fetch(tdb, kbuf);
/*
* Replace with an empty record to keep the allocated