crypto/ui/ui_lib.c:213: error: MEMORY_LEAK
  memory dynamically allocated by call to `strdup()` at line 204, column 15 is not reachable after line 213, column 3.
Showing all 6 steps of the trace


crypto/ui/ui_lib.c:197:1: start of procedure UI_dup_verify_string()
195.   	}
196.   
197. > int UI_dup_verify_string(UI *ui, const char *prompt, int echo_p,
198.   	char *result_buf, int minsize, int maxsize, const char *test_buf)
199.   	{

crypto/ui/ui_lib.c:200:2: 
198.   	char *result_buf, int minsize, int maxsize, const char *test_buf)
199.   	{
200. > 	char *prompt_copy=NULL;
201.   
202.   	if (prompt)

crypto/ui/ui_lib.c:202:6: Taking true branch
200.   	char *prompt_copy=NULL;
201.   
202.   	if (prompt)
            ^
203.   		{
204.   		prompt_copy=strdup(prompt);

crypto/ui/ui_lib.c:204:3: 
202.   	if (prompt)
203.   		{
204. > 		prompt_copy=strdup(prompt);
205.   		if (prompt_copy == NULL)
206.   			{

crypto/ui/ui_lib.c:205:7: Taking false branch
203.   		{
204.   		prompt_copy=strdup(prompt);
205.   		if (prompt_copy == NULL)
             ^
206.   			{
207.   			UIerr(UI_F_UI_DUP_VERIFY_STRING,ERR_R_MALLOC_FAILURE);

crypto/ui/ui_lib.c:213:3: Condition is false
211.   	
212.   	return general_allocate_string(ui, prompt, 1,
213.   		echo_p?UI_VERIFY_ECHO:UI_VERIFY_NOECHO,
         ^
214.   		result_buf, minsize, maxsize, test_buf);
215.   	}

int UI_dup_verify_string(UI *ui, const char *prompt, int echo_p,
	char *result_buf, int minsize, int maxsize, const char *test_buf)
	{
	char *prompt_copy=NULL;
	if (prompt)
		{
		prompt_copy=strdup(prompt);
		if (prompt_copy == NULL)
			{
			UIerr(UI_F_UI_DUP_VERIFY_STRING,ERR_R_MALLOC_FAILURE);
			return -1;
			}
		}
	return general_allocate_string(ui, prompt, 1,
		echo_p?UI_VERIFY_ECHO:UI_VERIFY_NOECHO,
		result_buf, minsize, maxsize, test_buf);
	}
['int UI_dup_verify_string(UI *ui, const char *prompt, int echo_p,\n\tchar *result_buf, int minsize, int maxsize, const char *test_buf)\n\t{\n\tchar *prompt_copy=NULL;\n\tif (prompt)\n\t\t{\n\t\tprompt_copy=strdup(prompt);\n\t\tif (prompt_copy == NULL)\n\t\t\t{\n\t\t\tUIerr(UI_F_UI_DUP_VERIFY_STRING,ERR_R_MALLOC_FAILURE);\n\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\treturn general_allocate_string(ui, prompt, 1,\n\t\techo_p?UI_VERIFY_ECHO:UI_VERIFY_NOECHO,\n\t\tresult_buf, minsize, maxsize, test_buf);\n\t}']