summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/ntlm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/ntlm')
-rw-r--r--source4/heimdal/lib/ntlm/heimntlm-protos.h2
-rw-r--r--source4/heimdal/lib/ntlm/heimntlm.h2
-rw-r--r--source4/heimdal/lib/ntlm/ntlm.c25
3 files changed, 21 insertions, 8 deletions
diff --git a/source4/heimdal/lib/ntlm/heimntlm-protos.h b/source4/heimdal/lib/ntlm/heimntlm-protos.h
index e9e0837003..2df32dfa50 100644
--- a/source4/heimdal/lib/ntlm/heimntlm-protos.h
+++ b/source4/heimdal/lib/ntlm/heimntlm-protos.h
@@ -83,7 +83,7 @@ void
heim_ntlm_free_type1 (struct ntlm_type1 */*data*/);
void
-heim_ntlm_free_type2 (struct ntlm_type2 */*type2*/);
+heim_ntlm_free_type2 (struct ntlm_type2 */*data*/);
void
heim_ntlm_free_type3 (struct ntlm_type3 */*data*/);
diff --git a/source4/heimdal/lib/ntlm/heimntlm.h b/source4/heimdal/lib/ntlm/heimntlm.h
index 1e38b2e400..1c1afe1eb1 100644
--- a/source4/heimdal/lib/ntlm/heimntlm.h
+++ b/source4/heimdal/lib/ntlm/heimntlm.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-/* $Id: heimntlm.h,v 1.4 2006/12/20 07:28:37 lha Exp $ */
+/* $Id: heimntlm.h 19469 2006-12-20 07:28:37Z lha $ */
#ifndef HEIM_NTLM_H
#define HEIM_NTLM_H
diff --git a/source4/heimdal/lib/ntlm/ntlm.c b/source4/heimdal/lib/ntlm/ntlm.c
index 430e80505e..af950cc3b5 100644
--- a/source4/heimdal/lib/ntlm/ntlm.c
+++ b/source4/heimdal/lib/ntlm/ntlm.c
@@ -33,7 +33,7 @@
#include <config.h>
-RCSID("$Id: ntlm.c,v 1.8 2006/12/26 00:25:17 lha Exp $");
+RCSID("$Id: ntlm.c 20816 2007-06-03 04:36:31Z lha $");
#include <stdio.h>
#include <stdlib.h>
@@ -308,8 +308,10 @@ heim_ntlm_decode_targetinfo(struct ntlm_buf *data, int ucs2,
void
heim_ntlm_free_type1(struct ntlm_type1 *data)
{
- free(data->domain);
- free(data->hostname);
+ if (data->domain)
+ free(data->domain);
+ if (data->hostname)
+ free(data->hostname);
memset(data, 0, sizeof(*data));
}
@@ -432,9 +434,12 @@ out:
*/
void
-heim_ntlm_free_type2(struct ntlm_type2 *type2)
+heim_ntlm_free_type2(struct ntlm_type2 *data)
{
- memset(type2, 0, sizeof(*type2));
+ if (data->targetname)
+ free(data->targetname);
+ _ntlm_free_buf(&data->targetinfo);
+ memset(data, 0, sizeof(*data));
}
int
@@ -558,10 +563,18 @@ out:
void
heim_ntlm_free_type3(struct ntlm_type3 *data)
{
+ _ntlm_free_buf(&data->lm);
+ _ntlm_free_buf(&data->ntlm);
+ if (data->targetname)
+ free(data->targetname);
+ if (data->username)
+ free(data->username);
+ if (data->ws)
+ free(data->ws);
+ _ntlm_free_buf(&data->sessionkey);
memset(data, 0, sizeof(*data));
}
-
/*
*
*/