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


ssl/ssl_cert.c:733:1: start of procedure SSL_add_dir_cert_subjects_to_stack()
731.   #ifndef MAC_OS_pre_X
732.   
733. > int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
734.   				       const char *dir)
735.   	{

ssl/ssl_cert.c:738:2: 
736.   	DIR *d;
737.   	struct dirent *dstruct;
738. > 	int ret = 0;
739.   
740.   	CRYPTO_w_lock(CRYPTO_LOCK_READDIR);

ssl/ssl_cert.c:740:2: 
738.   	int ret = 0;
739.   
740. > 	CRYPTO_w_lock(CRYPTO_LOCK_READDIR);
741.   	d = opendir(dir);
742.   

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

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

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

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

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

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

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

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

ssl/ssl_cert.c:752:9: Loop condition is true. Entering loop body
750.   		}
751.   	
752.   	while((dstruct=readdir(d)))
               ^
753.   		{
754.   		char buf[1024];

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

ssl/ssl_cert.c:759:4: 
757.   		if(strlen(dir)+strlen(dstruct->d_name)+2 > sizeof buf)
758.   			{
759. > 			SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG);
760.   			goto err;
761.   			}

crypto/err/err.c:615:1: start of procedure ERR_put_error()
  613.   /********************************************************/
  614.   
  615. > void ERR_put_error(int lib, int func, int reason, const char *file,
  616.   	     int line)
  617.   	{

crypto/err/err.c:639:2: Skipping ERR_get_state(): empty list of specs
  637.   	}
  638.   #endif
  639.   	es=ERR_get_state();
          ^
  640.   
  641.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:641:2: 
  639.   	es=ERR_get_state();
  640.   
  641. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
  642.   	if (es->top == es->bottom)
  643.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:642:6: Taking false branch
  640.   
  641.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
  642.   	if (es->top == es->bottom)
              ^
  643.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  644.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);

crypto/err/err.c:644:2: 
  642.   	if (es->top == es->bottom)
  643.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  644. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  645.   	es->err_file[es->top]=file;
  646.   	es->err_line[es->top]=line;

crypto/err/err.c:645:2: 
  643.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  644.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  645. > 	es->err_file[es->top]=file;
  646.   	es->err_line[es->top]=line;
  647.   	err_clear_data(es,es->top);

crypto/err/err.c:646:2: 
  644.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  645.   	es->err_file[es->top]=file;
  646. > 	es->err_line[es->top]=line;
  647.   	err_clear_data(es,es->top);
  648.   	}

crypto/err/err.c:647:2: Taking true branch
  645.   	es->err_file[es->top]=file;
  646.   	es->err_line[es->top]=line;
  647.   	err_clear_data(es,es->top);
          ^
  648.   	}
  649.   

crypto/err/err.c:647:2: Taking false branch
  645.   	es->err_file[es->top]=file;
  646.   	es->err_line[es->top]=line;
  647.   	err_clear_data(es,es->top);
          ^
  648.   	}
  649.   

crypto/err/err.c:648:2: return from a call to ERR_put_error
  646.   	es->err_line[es->top]=line;
  647.   	err_clear_data(es,es->top);
  648.   	}
          ^
  649.   
  650.   void ERR_clear_error(void)
