summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/cluster/ctdb')
-rw-r--r--source4/cluster/ctdb/opendb_ctdb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/cluster/ctdb/opendb_ctdb.c b/source4/cluster/ctdb/opendb_ctdb.c
index e12bf3260b..f184f7bb98 100644
--- a/source4/cluster/ctdb/opendb_ctdb.c
+++ b/source4/cluster/ctdb/opendb_ctdb.c
@@ -193,9 +193,14 @@ static NTSTATUS odb_pull_record(struct odb_lock *lck, struct opendb_file *file)
TDB_DATA dbuf;
DATA_BLOB blob;
NTSTATUS status;
-
+
dbuf = lck->data;
+ if (dbuf.dsize == 0) {
+ /* empty record in ctdb means the record isn't there */
+ return NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ }
+
blob.data = dbuf.dptr;
blob.length = dbuf.dsize;