]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix leaks on error in kadm5 init functions
authorGreg Hudson <ghudson@mit.edu>
Wed, 23 Jun 2021 20:53:16 +0000 (16:53 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 28 Jun 2021 15:51:30 +0000 (11:51 -0400)
commit552d7b7626450f963b8e37345c472420c842402c
treede0253e35832d536f5c6794979e30488b4bea93d
parentaa9b4a2a64046afd2fab7cb49c346295874a5fb6
Fix leaks on error in kadm5 init functions

In the GENERIC_CHECK_HANDLE function, separate out the
version-checking logic so we can call it in the init functions before
allocating resources.

In the client and server library initialization functions, use a
single exit path after argument validation, and share the destruction
code with kadm5_destroy() via a helper.
src/lib/kadm5/admin_internal.h
src/lib/kadm5/clnt/client_init.c
src/lib/kadm5/srv/server_init.c