ssl/ssl_cert.c:467: error: RESOURCE_LEAK
  resource acquired to `return` by call to `opendir()` at line 442, column 12 is not released after line 467, column 5.
Showing all 5 steps of the trace


ssl/ssl_cert.c:439:1: start of procedure SSL_add_dir_cert_subjects_to_stack()
437.   #ifndef WIN32
438.   
439. > int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
440.   				       const char *dir)
441.       {

ssl/ssl_cert.c:442:5: 
440.   				       const char *dir)
441.       {
442. >     DIR *d=opendir(dir);
443.       struct dirent *dstruct;
444.   

ssl/ssl_cert.c:446:9: Taking false branch
444.   
445.       /* Note that a side effect is that the CAs will be sorted by name */
446.       if(!d)
               ^
447.   	{
448.   	SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,ERR_R_MALLOC_FAILURE);

ssl/ssl_cert.c:452:12: Loop condition is false. Leaving loop
450.   	}
451.   
452.       while((dstruct=readdir(d)))
                  ^
453.   	{
454.   	char buf[1024];

ssl/ssl_cert.c:467:5: 
465.   	}
466.   
467. >     return 1;
468.       }
469.   
