فهرست منبع

Bug 630091 - (cov#15582) Free of uninitialized pointer in attr_index_config()

In attr_index_config(), if argc or argv are NULL, we jump to the
done label.  We then try to free attrs, but it was never initialized.
We need to initialize attrs to NULL.
Nathan Kinder 15 سال پیش
والد
کامیت
5ae8186835
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      ldap/servers/slapd/back-ldbm/ldbm_attr.c

+ 1 - 1
ldap/servers/slapd/back-ldbm/ldbm_attr.c

@@ -178,7 +178,7 @@ attr_index_config(
 {
 	ldbm_instance *inst = (ldbm_instance *) be->be_instance_info;
 	int	i, j;
-	char	**attrs;
+	char	**attrs = NULL;
 	char	**indexes = NULL;
 	char	**index_rules = NULL;
 	struct attrinfo	*a;