1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +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 34f9f1b37e
commit 0fdfc85f28

View File

@ -1817,7 +1817,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,
@ -1829,7 +1832,6 @@ bool mds_dispatch(struct mds_ctx *mds_ctx,
goto cleanup;
}
response_blob->length = len;
}
cleanup:
talloc_free(query);