From: Stefan Metzmacher Date: Mon, 25 Jul 2022 20:19:13 +0000 (+0200) Subject: s3:dbwrap_watch: filter out records with empty payload during traverse X-Git-Tag: ldb-2.6.1~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc9c8b8e7e0e2ab8512fb443b89780a11bc966ae;p=thirdparty%2Fsamba.git s3:dbwrap_watch: filter out records with empty payload during traverse We will soon have records with just a number of watchers, but without payload. These records should not be visible during traverse. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/source3/lib/dbwrap/dbwrap_watch.c b/source3/lib/dbwrap/dbwrap_watch.c index d4497355b9a..20d08b55fc8 100644 --- a/source3/lib/dbwrap/dbwrap_watch.c +++ b/source3/lib/dbwrap/dbwrap_watch.c @@ -584,6 +584,9 @@ static int dbwrap_watched_traverse_fn(struct db_record *rec, if (!ok) { return 0; } + if (prec.value.dsize == 0) { + return 0; + } prec.value_valid = true; return state->fn(&prec, state->private_data);