浏览代码

610281 - fix coverity Defect Type: Control flow issues

https://bugzilla.redhat.com/show_bug.cgi?id=610281

11815 DEADCODE Triaged Unassigned Bug Minor Fix Required
distinguishedname_validate() ds/ldap/servers/plugins/syntaxes/validate.c

Comment:
A variable val_copy is declared and initialized, but not used.
We remove these lines:
364 char *val_copy = NULL;
403 if (val_copy) {
Execution cannot reach this statement "slapi_ch_free_string(&val_c...".
404 slapi_ch_free_string(&val_copy);
405 }
Noriko Hosoi 15 年之前
父节点
当前提交
732b57f12e
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      ldap/servers/plugins/syntaxes/validate.c

+ 0 - 4
ldap/servers/plugins/syntaxes/validate.c

@@ -361,7 +361,6 @@ int distinguishedname_validate(
 )
 {
 	int rc = 0; /* Assume value is valid */
-	char *val_copy = NULL;
 	const char *p = begin;
 	const char *last = NULL;
 
@@ -400,9 +399,6 @@ int distinguishedname_validate(
 	}
 
 exit:
-	if (val_copy) {
-		slapi_ch_free_string(&val_copy);
-	}
 	return rc;
 }