Browse Source

Ticket 48276 - initialize free_flags in reslimit_update_from_entry()

Description:  In reslimit_update_from_entry() the free_flags was not initialized,
              which could lead to it being seen as set, and cause an entry's
              vattrs to be incorrectly/unexpectedly freed.

https://fedorahosted.org/389/ticket/48276

Reviewed by: nhosoi(Thanks!)
Mark Reynolds 10 years ago
parent
commit
2311c71cec
1 changed files with 8 additions and 5 deletions
  1. 8 5
      ldap/servers/slapd/resourcelimit.c

+ 8 - 5
ldap/servers/slapd/resourcelimit.c

@@ -342,11 +342,14 @@ reslimit_update_from_dn( Slapi_Connection *conn, Slapi_DN *dn )
 int
 reslimit_update_from_entry( Slapi_Connection *conn, Slapi_Entry *e )
 {
-	char					*fnname = "reslimit_update_from_entry()";
-	char					*actual_type_name, *get_ext_logname;
-	int						i, rc, type_name_disposition, free_flags;
-	SLAPIResLimitConnData	*rlcdp;
-	Slapi_ValueSet			*vs;
+	SLAPIResLimitConnData *rlcdp = NULL;
+	Slapi_ValueSet *vs = NULL;
+	char *fnname = "reslimit_update_from_entry()";
+	char *actual_type_name = NULL;
+	char *get_ext_logname = NULL;
+	int type_name_disposition = 0;
+	int free_flags = 0;
+	int rc, i;
 
 	LDAPDebug( SLAPI_RESLIMIT_TRACELEVEL, "=> %s conn=0x%x, entry=0x%x\n",
 			fnname, conn, e );