Skip to content

Commit

Permalink
KCM: When freeing the client, check that it is not NULL.
Browse files Browse the repository at this point in the history
`cc-> client` could be NULL.

Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
  • Loading branch information
aplopez authored and pbrezina committed Nov 28, 2023
1 parent 1269205 commit 2eb67af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/responder/kcm/kcmsrv_ccache.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ static int kcm_cc_destructor(struct kcm_ccache *cc)
return 0;
}

krb5_free_principal(NULL, cc->client);
if (cc->client != NULL) {
krb5_free_principal(NULL, cc->client);
}
return 0;
}

Expand Down

0 comments on commit 2eb67af

Please sign in to comment.