1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

kdc: Free the resource which is not used anymore

In samba_kdc_firstkey() routine, krb5_get_default_realm() allocates
memory for "realm" but never used afterwards. Free() the leaked memory.

CID: 1107223

Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Santosh Kumar Pradhan 2014-02-21 09:43:47 +05:30 committed by Andreas Schneider
parent 66fb0ce955
commit 58e7e564d7

View File

@ -1560,6 +1560,7 @@ krb5_error_code samba_kdc_firstkey(krb5_context context,
TALLOC_FREE(priv);
return ret;
}
krb5_free_default_realm(context, realm);
lret = dsdb_search(ldb_ctx, priv, &res,
priv->realm_dn, LDB_SCOPE_SUBTREE, user_attrs,