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


ssl/ssl_cert.c:640:1: start of procedure SSL_add_dir_cert_subjects_to_stack()
638.   #ifndef WIN32
639.   
640. > int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
641.   				       const char *dir)
642.       {

ssl/ssl_cert.c:643:5: 
641.   				       const char *dir)
642.       {
643. >     DIR *d=opendir(dir);
644.       struct dirent *dstruct;
645.   

ssl/ssl_cert.c:647:9: Taking false branch
645.   
646.       /* Note that a side effect is that the CAs will be sorted by name */
647.       if(!d)
               ^
648.   	{
649.   	SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,ERR_R_MALLOC_FAILURE);

ssl/ssl_cert.c:653:12: Loop condition is false. Leaving loop
651.   	}
652.   
653.       while((dstruct=readdir(d)))
                  ^
654.   	{
655.   	char buf[1024];

ssl/ssl_cert.c:668:5: 
666.   	}
667.   
668. >     return 1;
669.       }
670.   
