diff options
Diffstat (limited to 'source3/smbd/smbXsrv_open.c')
-rw-r--r-- | source3/smbd/smbXsrv_open.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/smbXsrv_open.c b/source3/smbd/smbXsrv_open.c index 3566dc2591..3e2fed3ac1 100644 --- a/source3/smbd/smbXsrv_open.c +++ b/source3/smbd/smbXsrv_open.c @@ -1388,6 +1388,7 @@ NTSTATUS smbXsrv_open_cleanup(uint64_t persistent_id) struct smbXsrv_open_global0 *op = NULL; uint8_t key_buf[SMBXSRV_OPEN_GLOBAL_TDB_KEY_SIZE]; TDB_DATA key; + TDB_DATA val; struct db_record *rec; bool delete_open = false; uint32_t global_id = persistent_id & UINT32_MAX; @@ -1403,6 +1404,14 @@ NTSTATUS smbXsrv_open_cleanup(uint64_t persistent_id) goto done; } + val = dbwrap_record_get_value(rec); + if (val.dsize == 0) { + DEBUG(10, ("smbXsrv_open_cleanup[global: 0x%08x] " + "empty record in %s, skipping...\n", + global_id, dbwrap_name(smbXsrv_open_global_db_ctx))); + goto done; + } + status = smbXsrv_open_global_parse_record(talloc_tos(), rec, &op); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("smbXsrv_open_cleanup[global: 0x%08x] " |