summaryrefslogtreecommitdiff
path: root/source4/lib/messaging/messaging.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-05-20 11:37:23 +1000
committerAndrew Tridgell <tridge@samba.org>2008-05-20 11:37:23 +1000
commit9551d4027dd9bbdfa1fcb4a5a117792811ec7f29 (patch)
treecfb05907f4e142ec997d745e4e251b4a0a5ec953 /source4/lib/messaging/messaging.c
parente7d993b8b26e121ff37640825b4d2f2c4d6332bf (diff)
parente533e7a7ebc8b3029cf604e63cdc6d1cf8570ccd (diff)
downloadsamba-9551d4027dd9bbdfa1fcb4a5a117792811ec7f29.tar.gz
samba-9551d4027dd9bbdfa1fcb4a5a117792811ec7f29.tar.bz2
samba-9551d4027dd9bbdfa1fcb4a5a117792811ec7f29.zip
Merge commit 'origin/v4-0-test' into vfs_smb2
(This used to be commit ffbd222d651dcddb19cacdc50cdbfeaefa816940)
Diffstat (limited to 'source4/lib/messaging/messaging.c')
-rw-r--r--source4/lib/messaging/messaging.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c
index 19284461ee..e7b654894f 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -1085,8 +1085,14 @@ void irpc_remove_name(struct messaging_context *msg_ctx, const char *name)
return;
}
rec = tdb_fetch_bystring(t->tdb, name);
+ if (rec.dptr == NULL) {
+ tdb_unlock_bystring(t->tdb, name);
+ talloc_free(t);
+ return;
+ }
count = rec.dsize / sizeof(struct server_id);
if (count == 0) {
+ free(rec.dptr);
tdb_unlock_bystring(t->tdb, name);
talloc_free(t);
return;