ssl/ssl_cert.c:755: error: RESOURCE_LEAK
  resource acquired by call to `opendir()` at line 737, column 6 is not released after line 755, column 4.
Showing all 24 steps of the trace


ssl/ssl_cert.c:729:1: start of procedure SSL_add_dir_cert_subjects_to_stack()
727.   #ifndef MAC_OS_pre_X
728.   
729. > int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
730.   				       const char *dir)
731.   	{

ssl/ssl_cert.c:734:2: 
732.   	DIR *d;
733.   	struct dirent *dstruct;
734. > 	int ret = 0;
735.   
736.   	CRYPTO_w_lock(CRYPTO_LOCK_READDIR);

ssl/ssl_cert.c:736:2: 
734.   	int ret = 0;
735.   
736. > 	CRYPTO_w_lock(CRYPTO_LOCK_READDIR);
737.   	d = opendir(dir);
738.   

crypto/cryptlib.c:375:1: start of procedure CRYPTO_lock()
  373.   	}
  374.   
  375. > void CRYPTO_lock(int mode, int type, const char *file, int line)
  376.   	{
  377.   #ifdef LOCK_DEBUG

crypto/cryptlib.c:400:6: Taking false branch
  398.   		}
  399.   #endif
  400.   	if (type < 0)
              ^
  401.   		{
  402.   		struct CRYPTO_dynlock_value *pointer

crypto/cryptlib.c:413:7: Taking true branch
  411.   		}
  412.   	else
  413.   		if (locking_callback != NULL)
               ^
  414.   			locking_callback(mode,type,file,line);
  415.   	}

crypto/cryptlib.c:414:4: Skipping __function_pointer__(): unresolved function pointer
  412.   	else
  413.   		if (locking_callback != NULL)
  414.   			locking_callback(mode,type,file,line);
            ^
  415.   	}
  416.   

crypto/cryptlib.c:400:2: 
  398.   		}
  399.   #endif
  400. > 	if (type < 0)
  401.   		{
  402.   		struct CRYPTO_dynlock_value *pointer

crypto/cryptlib.c:415:2: return from a call to CRYPTO_lock
  413.   		if (locking_callback != NULL)
  414.   			locking_callback(mode,type,file,line);
  415.   	}
          ^
  416.   
  417.   int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,

ssl/ssl_cert.c:737:2: 
735.   
736.   	CRYPTO_w_lock(CRYPTO_LOCK_READDIR);
737. > 	d = opendir(dir);
738.   
739.   	/* Note that a side effect is that the CAs will be sorted by name */

ssl/ssl_cert.c:740:6: Taking false branch
738.   
739.   	/* Note that a side effect is that the CAs will be sorted by name */
740.   	if(!d)
            ^
741.   		{
742.   		SYSerr(SYS_F_OPENDIR, get_last_sys_error());

ssl/ssl_cert.c:748:9: Loop condition is true. Entering loop body
746.   		}
747.   	
748.   	while((dstruct=readdir(d)))
               ^
749.   		{
750.   		char buf[1024];

ssl/ssl_cert.c:753:6: Taking true branch
751.   		int r;
752.   		
753.   		if(strlen(dir)+strlen(dstruct->d_name)+2 > sizeof buf)
            ^
754.   			{
755.   			SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG);

ssl/ssl_cert.c:755:4: 
753.   		if(strlen(dir)+strlen(dstruct->d_name)+2 > sizeof buf)
754.   			{
755. > 			SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG);
756.   			goto err;
757.   			}

crypto/err/err.c:582:1: start of procedure ERR_put_error()
  580.   /********************************************************/
  581.   
  582. > void ERR_put_error(int lib, int func, int reason, const char *file,
  583.   	     int line)
  584.   	{

crypto/err/err.c:606:2: Skipping ERR_get_state(): empty list of specs
  604.   	}
  605.   #endif
  606.   	es=ERR_get_state();
          ^
  607.   
  608.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:608:2: 
  606.   	es=ERR_get_state();
  607.   
  608. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
  609.   	if (es->top == es->bottom)
  610.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:609:6: Taking false branch
  607.   
  608.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
  609.   	if (es->top == es->bottom)
              ^
  610.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  611.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);

crypto/err/err.c:611:2: 
  609.   	if (es->top == es->bottom)
  610.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  611. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  612.   	es->err_file[es->top]=file;
  613.   	es->err_line[es->top]=line;

crypto/err/err.c:612:2: 
  610.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  611.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  612. > 	es->err_file[es->top]=file;
  613.   	es->err_line[es->top]=line;
  614.   	err_clear_data(es,es->top);

crypto/err/err.c:613:2: 
  611.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  612.   	es->err_file[es->top]=file;
  613. > 	es->err_line[es->top]=line;
  614.   	err_clear_data(es,es->top);
  615.   	}

crypto/err/err.c:614:2: Taking true branch
  612.   	es->err_file[es->top]=file;
  613.   	es->err_line[es->top]=line;
  614.   	err_clear_data(es,es->top);
          ^
  615.   	}
  616.   

crypto/err/err.c:614:2: Taking false branch
  612.   	es->err_file[es->top]=file;
  613.   	es->err_line[es->top]=line;
  614.   	err_clear_data(es,es->top);
          ^
  615.   	}
  616.   

crypto/err/err.c:615:2: return from a call to ERR_put_error
  613.   	es->err_line[es->top]=line;
  614.   	err_clear_data(es,es->top);
  615.   	}
          ^
  616.   
  617.   void ERR_clear_error(void)
