HomeFreeBSD

libkrb5: Fix potential double-free

Description

libkrb5: Fix potential double-free

If krb5_make_principal fails, tmp_creds.server may remain a pointer to freed
memory and then be double-freed. After freeing it the first time, initialize
it to NULL, which causes subsequent krb5_free_principal calls to do the right
thing.

Reported by: Coverity
CID: 1273430
Sponsored by: EMC / Isilon Storage Division

Details

Provenance
cemAuthored on
Parents
rS299494: subr_vmem: Fix double-free in error case of vmem_create
Branches
Unknown
Tags
Unknown