1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

CVE-2023-34968: mdssvc: switch to doing an early return

Just reduce indentation of the code handling the success case. No change in
behaviour.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15388

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2023-06-20 11:05:22 +02:00 committed by Jule Anger
parent 33b82c6185
commit ac9008a20c

View File

@ -1804,7 +1804,10 @@ bool mds_dispatch(struct mds_ctx *mds_ctx,
}
ok = slcmd->function(mds_ctx, query, reply);
if (ok) {
if (!ok) {
goto cleanup;
}
DBG_DEBUG("%s", dalloc_dump(reply, 0));
len = sl_pack(reply,
@ -1816,7 +1819,6 @@ bool mds_dispatch(struct mds_ctx *mds_ctx,
goto cleanup;
}
response_blob->length = len;
}
cleanup:
talloc_free(query);