summaryrefslogtreecommitdiff
path: root/source4/lib/messaging
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/messaging')
-rw-r--r--source4/lib/messaging/config.mk3
-rw-r--r--source4/lib/messaging/messaging.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/source4/lib/messaging/config.mk b/source4/lib/messaging/config.mk
index 0a0097bdf3..eaf7e3581e 100644
--- a/source4/lib/messaging/config.mk
+++ b/source4/lib/messaging/config.mk
@@ -13,5 +13,4 @@ PUBLIC_DEPENDENCIES = \
# End SUBSYSTEM MESSAGING
################################################
-
-MESSAGING_OBJ_FILES = lib/messaging/messaging.o
+MESSAGING_OBJ_FILES = $(libmessagingsrcdir)/messaging.o
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;