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


ssl/ssl_cert.c:644:1: start of procedure SSL_add_dir_cert_subjects_to_stack()
642.   #ifndef WIN32
643.   
644. > int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
645.   				       const char *dir)
646.       {

ssl/ssl_cert.c:647:5: 
645.   				       const char *dir)
646.       {
647. >     DIR *d=opendir(dir);
648.       struct dirent *dstruct;
649.   

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

ssl/ssl_cert.c:657:12: Loop condition is false. Leaving loop
655.   	}
656.   
657.       while((dstruct=readdir(d)))
                  ^
658.   	{
659.   	char buf[1024];

ssl/ssl_cert.c:672:5: 
670.   	}
671.   
672. >     return 1;
673.       }
674.   
