svn commit: lorikeet r50 - in trunk/heimdal/lib/hdb: .

abartlet at samba.org abartlet at samba.org
Mon Sep 6 07:17:23 GMT 2004


Author: abartlet
Date: 2004-09-06 07:17:23 +0000 (Mon, 06 Sep 2004)
New Revision: 50

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=lorikeet&path=/trunk/heimdal/lib/hdb&rev=50&nolog=1

Log:
Fix some memory leaks in the hdb-ldb code.

Andrew Bartlett

Modified:
   trunk/heimdal/lib/hdb/hdb-ldb.c


Changeset:
Modified: trunk/heimdal/lib/hdb/hdb-ldb.c
===================================================================
--- trunk/heimdal/lib/hdb/hdb-ldb.c	2004-09-06 06:59:32 UTC (rev 49)
+++ trunk/heimdal/lib/hdb/hdb-ldb.c	2004-09-06 07:17:23 UTC (rev 50)
@@ -386,6 +386,7 @@
 		ret = HDB_ERR_NOENTRY;
 		goto out;
 	} else if (count > 1) {
+    		ldb_search_free(ldb_ctx, msg);
 		krb5_warnx(context, "ldb_search: filter: '%s' more than 1 entry", filter);
 		krb5_set_error_string(context, "ldb_search: filter: '%s' more than 1 entry", filter);
 		ret = HDB_ERR_NOENTRY;
@@ -404,6 +405,10 @@
 		free(filter);
 	}
 
+	if (realm_filter) {
+		free(realm_filter);
+	}
+
 	if (princ) {
 		free(princ);
 	}
@@ -532,7 +537,7 @@
 	}
 
 	if (msg) {
-    		ldb_search_free(ldb_ctx,msg);
+    		ldb_search_free(ldb_ctx, msg);
 	}
 
 	return ret;



More information about the samba-cvs mailing list