From fe79d759dafef12af26da0a866969100c4aa065b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 17 Jul 2014 14:50:33 +0000 Subject: [PATCH] messaging4: Remove unnecessary locking We don't do any modifying operations on the database, so locking is not needed here Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- source4/lib/messaging/messaging.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 19a20c471c3..7c05e5291d2 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -960,18 +960,13 @@ struct server_id *irpc_servers_byname(struct imessaging_context *msg_ctx, int count, i; struct server_id *ret; - if (tdb_lock_bystring(t->tdb, name) != 0) { - return NULL; - } rec = tdb_fetch_bystring(t->tdb, name); if (rec.dptr == NULL) { - tdb_unlock_bystring(t->tdb, name); return NULL; } count = rec.dsize / sizeof(struct server_id); ret = talloc_array(mem_ctx, struct server_id, count+1); if (ret == NULL) { - tdb_unlock_bystring(t->tdb, name); return NULL; } for (i=0;itdb, name); return ret; } -- 2.11.4.GIT