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


crypto/ui/ui_lib.c:169:1: start of procedure UI_dup_input_string()
167.   
168.   /* Same as UI_add_input_string(), excepts it takes a copy of the prompt */
169. > int UI_dup_input_string(UI *ui, const char *prompt, int flags,
170.   	char *result_buf, int minsize, int maxsize)
171.   	{

crypto/ui/ui_lib.c:172:2: 
170.   	char *result_buf, int minsize, int maxsize)
171.   	{
172. > 	char *prompt_copy=NULL;
173.   
174.   	if (prompt)

crypto/ui/ui_lib.c:174:6: Taking true branch
172.   	char *prompt_copy=NULL;
173.   
174.   	if (prompt)
            ^
175.   		{
176.   		prompt_copy=strdup(prompt);

crypto/ui/ui_lib.c:176:3: 
174.   	if (prompt)
175.   		{
176. > 		prompt_copy=strdup(prompt);
177.   		if (prompt_copy == NULL)
178.   			{

crypto/ui/ui_lib.c:177:7: Taking false branch
175.   		{
176.   		prompt_copy=strdup(prompt);
177.   		if (prompt_copy == NULL)
             ^
178.   			{
179.   			UIerr(UI_F_UI_DUP_INPUT_STRING,ERR_R_MALLOC_FAILURE);

crypto/ui/ui_lib.c:184:2: 
182.   		}
183.   	
184. > 	return general_allocate_string(ui, prompt, 1,
185.   		UIT_PROMPT, flags, result_buf, minsize, maxsize, NULL);
186.   	}

int UI_dup_input_string(UI *ui, const char *prompt, int flags,
	char *result_buf, int minsize, int maxsize)
	{
	char *prompt_copy=NULL;
	if (prompt)
		{
		prompt_copy=strdup(prompt);
		if (prompt_copy == NULL)
			{
			UIerr(UI_F_UI_DUP_INPUT_STRING,ERR_R_MALLOC_FAILURE);
			return 0;
			}
		}
	return general_allocate_string(ui, prompt, 1,
		UIT_PROMPT, flags, result_buf, minsize, maxsize, NULL);
	}
['int UI_dup_input_string(UI *ui, const char *prompt, int flags,\n\tchar *result_buf, int minsize, int maxsize)\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_INPUT_STRING,ERR_R_MALLOC_FAILURE);\n\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\treturn general_allocate_string(ui, prompt, 1,\n\t\tUIT_PROMPT, flags, result_buf, minsize, maxsize, NULL);\n\t}']