summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-07 22:29:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:28 -0500
commitaab1dd4ddbe45c625a6e4502cecd20da5762739b (patch)
tree3ec64a202be141866ef1f0c43a9e00c0d66413dd /source3/libads
parent7b2c2e415543aaee13193be1bd11706f2528c692 (diff)
downloadsamba-aab1dd4ddbe45c625a6e4502cecd20da5762739b.tar.gz
samba-aab1dd4ddbe45c625a6e4502cecd20da5762739b.tar.bz2
samba-aab1dd4ddbe45c625a6e4502cecd20da5762739b.zip
r21755: Memory leak fixes from Zack Kirsch <zack.kirsch@isilon.com>.
Jeremy. (This used to be commit 02d08ca0be8c374e30c3c0e665853fa9e57f043a)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/cldap.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/libads/cldap.c b/source3/libads/cldap.c
index 72018c620d..3cb98c59c5 100644
--- a/source3/libads/cldap.c
+++ b/source3/libads/cldap.c
@@ -187,8 +187,10 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply)
{
int ret;
ASN1_DATA data;
- DATA_BLOB blob;
- DATA_BLOB os1, os2, os3;
+ DATA_BLOB blob = data_blob(NULL, 0);
+ DATA_BLOB os1 = data_blob(NULL, 0);
+ DATA_BLOB os2 = data_blob(NULL, 0);
+ DATA_BLOB os3 = data_blob(NULL, 0);
int i1;
/* half the time of a regular ldap timeout, not less than 3 seconds. */
unsigned int al_secs = MAX(3,lp_ldap_timeout()/2);
@@ -238,6 +240,9 @@ static int recv_cldap_netlogon(int sock, struct cldap_netlogon_reply *reply)
if (data.has_error) {
data_blob_free(&blob);
+ data_blob_free(&os1);
+ data_blob_free(&os2);
+ data_blob_free(&os3);
asn1_free(&data);
DEBUG(1,("Failed to parse cldap reply\n"));
return -1;