git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
449ab39
)
s3-spnego: fix memleak in spnego_parse_auth().
author
Günther Deschner
<gd@samba.org>
Thu, 15 Oct 2009 13:45:20 +0000
(15:45 +0200)
committer
Günther Deschner
<gd@samba.org>
Thu, 15 Oct 2009 13:45:20 +0000
(15:45 +0200)
Guenther
source3/libsmb/clispnego.c
patch
|
blob
|
history
diff --git
a/source3/libsmb/clispnego.c
b/source3/libsmb/clispnego.c
index 1103ef84b63bf965936929b5728eb50bd23ec9b6..e20749b3e8af57e4263409f67120d20b68bd6197 100644
(file)
--- 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;
}