소스 검색

609255 - fix coverity Defect Type: Memory - illegal accesses issues

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

12291 USE_AFTER_FREE Triaged Unassigned Bug Minor Fix Required
dbconf_read_default_dbinfo_sub() ds/lib/ldaputil/dbconf.c

Comment:
should never happen - should always break out of the loop at 504
with a valid db_info - but we should set db_info = NULL after line
505 just to make sure
Noriko Hosoi 15 년 전
부모
커밋
7fa74e30e3
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      lib/ldaputil/dbconf.c

+ 1 - 0
lib/ldaputil/dbconf.c

@@ -503,6 +503,7 @@ int dbconf_read_default_dbinfo_sub (const char *file,
     {
 	if (!strcmp(db_info->dbname, DBCONF_DEFAULT_DBNAME)) break;
 	dbconf_free_dbinfo(db_info);
+	db_info = NULL;
     }
 
     if (rv != LDAPU_SUCCESS) {