svn commit: samba r4091 - in trunk/source/param: .

jra at samba.org jra at samba.org
Wed Dec 8 00:33:38 GMT 2004


Author: jra
Date: 2004-12-08 00:33:38 +0000 (Wed, 08 Dec 2004)
New Revision: 4091

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4091

Log:
Fixed possible use of uninitialised variables.
Jeremy.

Modified:
   trunk/source/param/config_ldap.c


Changeset:
Modified: trunk/source/param/config_ldap.c
===================================================================
--- trunk/source/param/config_ldap.c	2004-12-08 00:25:00 UTC (rev 4090)
+++ trunk/source/param/config_ldap.c	2004-12-08 00:33:38 UTC (rev 4091)
@@ -161,8 +161,8 @@
 	int count;
 	const char *config_attr_list[] = {"description", NULL};
 	const char *share_attr_list[] = {"sambaShareName", "description", NULL};
-	char **share_dn;
-	char **share_name;
+	char **share_dn = NULL;
+	char **share_name = NULL;
 
 	mem_ctx = talloc_init("ldap_config_load");
 	
@@ -266,7 +266,7 @@
 	}
 	if (!NT_STATUS_IS_OK(parse_section(config_dn, pfunc))) {
 		goto done;
-	} else { /* parse shares */
+	} else if (share_dn && share_name) { /* parse shares */
 		int i;
 
 		for (i = 0; share_dn[i] != NULL; i++) {



More information about the samba-cvs mailing list