diff options
author | Santosh Kumar Pradhan <spradhan@redhat.com> | 2014-02-21 09:43:47 +0530 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-02-21 15:59:28 +0100 |
commit | 58e7e564d7c81dc1b1084174957568396233a743 (patch) | |
tree | dd98d452314b40fb9abdc657a9b3008efae2d6b6 /source4/kdc | |
parent | 66fb0ce9557553a4c01607b517e65ac4c93841d0 (diff) | |
download | samba-58e7e564d7c81dc1b1084174957568396233a743.tar.gz samba-58e7e564d7c81dc1b1084174957568396233a743.tar.xz samba-58e7e564d7c81dc1b1084174957568396233a743.zip |
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>
Diffstat (limited to 'source4/kdc')
-rw-r--r-- | source4/kdc/db-glue.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c index ab606e8e237..f971d9b5d3f 100644 --- a/source4/kdc/db-glue.c +++ b/source4/kdc/db-glue.c @@ -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, |