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


ssl/ssl_cert.c:725:1: start of procedure SSL_add_dir_cert_subjects_to_stack()
723.   #ifndef MAC_OS_pre_X
724.   
725. > int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
726.   				       const char *dir)
727.   	{

ssl/ssl_cert.c:730:2: 
728.   	DIR *d;
729.   	struct dirent *dstruct;
730. > 	int ret = 0;
731.   
732.   	CRYPTO_w_lock(CRYPTO_LOCK_READDIR);

ssl/ssl_cert.c:732:2: 
730.   	int ret = 0;
731.   
732. > 	CRYPTO_w_lock(CRYPTO_LOCK_READDIR);
733.   	d = opendir(dir);
734.   

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:733:2: 
731.   
732.   	CRYPTO_w_lock(CRYPTO_LOCK_READDIR);
733. > 	d = opendir(dir);
734.   
735.   	/* Note that a side effect is that the CAs will be sorted by name */

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

ssl/ssl_cert.c:744:9: Loop condition is true. Entering loop body
742.   		}
743.   	
744.   	while((dstruct=readdir(d)))
               ^
745.   		{
746.   		char buf[1024];

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

ssl/ssl_cert.c:751:4: 
749.   		if(strlen(dir)+strlen(dstruct->d_name)+2 > sizeof buf)
750.   			{
751. > 			SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,SSL_R_PATH_TOO_LONG);
752.   			goto err;
753.   			}

crypto/err/err.c:357:1: start of procedure ERR_put_error()
  355.   /********************************************************/
  356.   
  357. > void ERR_put_error(int lib, int func, int reason, const char *file,
  358.   	     int line)
  359.   	{

crypto/err/err.c:381:2: Skipping ERR_get_state(): empty list of specs
  379.   	}
  380.   #endif
  381.   	es=ERR_get_state();
          ^
  382.   
  383.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:383:2: 
  381.   	es=ERR_get_state();
  382.   
  383. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
  384.   	if (es->top == es->bottom)
  385.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:384:6: Taking false branch
  382.   
  383.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
  384.   	if (es->top == es->bottom)
              ^
  385.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  386.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);

crypto/err/err.c:386:2: 
  384.   	if (es->top == es->bottom)
  385.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  386. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  387.   	es->err_file[es->top]=file;
  388.   	es->err_line[es->top]=line;

crypto/err/err.c:387:2: 
  385.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
  386.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  387. > 	es->err_file[es->top]=file;
  388.   	es->err_line[es->top]=line;
  389.   	err_clear_data(es,es->top);

crypto/err/err.c:388:2: 
  386.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
  387.   	es->err_file[es->top]=file;
  388. > 	es->err_line[es->top]=line;
  389.   	err_clear_data(es,es->top);
  390.   	}

crypto/err/err.c:389:2: Taking true branch
  387.   	es->err_file[es->top]=file;
  388.   	es->err_line[es->top]=line;
  389.   	err_clear_data(es,es->top);
          ^
  390.   	}
  391.   

crypto/err/err.c:389:2: Taking false branch
  387.   	es->err_file[es->top]=file;
  388.   	es->err_line[es->top]=line;
  389.   	err_clear_data(es,es->top);
          ^
  390.   	}
  391.   

crypto/err/err.c:390:2: return from a call to ERR_put_error
  388.   	es->err_line[es->top]=line;
  389.   	err_clear_data(es,es->top);
  390.   	}
          ^
  391.   
  392.   void ERR_clear_error(void)
