summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorUri Simchoni <uri@samba.org>2016-07-03 22:51:56 +0300
committerRichard Sharpe <sharpe@samba.org>2016-07-05 20:55:08 +0200
commita646d9e796902dcb5246eb585433d4859796be2f (patch)
tree1f958eb27aee4b8eb3318d14dbff058dcbe9367d /source3/libads
parentc9d61dbbfb595899c69bbf6c827ac6bf46e74214 (diff)
downloadsamba-a646d9e796902dcb5246eb585433d4859796be2f.tar.gz
s3-libads: fix a memory leak in ads_sasl_spnego_bind()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12006 Signed-off-by: Uri Simchoni <uri@samba.org> Signed-off-by: Richard Sharpe <rsharpe@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/sasl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index 10f63e89181..d76d8724ac0 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -696,7 +696,7 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
struct berval *scred=NULL;
int rc, i;
ADS_STATUS status;
- DATA_BLOB blob;
+ DATA_BLOB blob = data_blob_null;
char *given_principal = NULL;
char *OIDs[ASN1_MAX_OIDS];
#ifdef HAVE_KRB5
@@ -792,6 +792,9 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
done:
ads_free_service_principal(&p);
TALLOC_FREE(frame);
+ if (blob.data != NULL) {
+ data_blob_free(&blob);
+ }
return status;
}