summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-10-15 15:45:20 +0200
committerGünther Deschner <gd@samba.org>2009-10-15 15:45:20 +0200
commitef194bc692d4bb5fddc2c437ce66aa32080ca2dc (patch)
tree2afb87acd662107c078fada739aaa1f2ef3652ef /source3/libsmb
parent449ab398f58c6e0041621752322ebe24e6d70225 (diff)
downloadsamba-ef194bc692d4bb5fddc2c437ce66aa32080ca2dc.tar.gz
samba-ef194bc692d4bb5fddc2c437ce66aa32080ca2dc.tar.bz2
samba-ef194bc692d4bb5fddc2c437ce66aa32080ca2dc.zip
s3-spnego: fix memleak in spnego_parse_auth().
Guenther
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clispnego.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index 1103ef84b6..e20749b3e8 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -507,10 +507,14 @@ bool spnego_parse_auth(DATA_BLOB blob, DATA_BLOB *auth)
if (token.type != SPNEGO_NEG_TOKEN_TARG) {
DEBUG(3,("spnego_parse_auth: wrong token type: %d\n",
token.type));
+ spnego_free_data(&token);
return false;
}
- *auth = token.negTokenTarg.responseToken;
+ *auth = data_blob_talloc(talloc_tos(),
+ token.negTokenTarg.responseToken.data,
+ token.negTokenTarg.responseToken.length);
+ spnego_free_data(&token);
return true;
}