crypto/ui/ui_lib.c:214: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_strdup()` at line 207, column 23 is not reachable after line 214, column 5.
Showing all 30 steps of the trace


crypto/ui/ui_lib.c:201:1: start of procedure UI_dup_input_string()
199.   
200.   /* Same as UI_add_input_string(), excepts it takes a copy of the prompt */
201. > int UI_dup_input_string(UI *ui, const char *prompt, int flags,
202.                           char *result_buf, int minsize, int maxsize)
203.   {

crypto/ui/ui_lib.c:204:5: 
202.                           char *result_buf, int minsize, int maxsize)
203.   {
204. >     char *prompt_copy = NULL;
205.   
206.       if (prompt) {

crypto/ui/ui_lib.c:206:9: Taking true branch
204.       char *prompt_copy = NULL;
205.   
206.       if (prompt) {
               ^
207.           prompt_copy = OPENSSL_strdup(prompt);
208.           if (prompt_copy == NULL) {

crypto/ui/ui_lib.c:207:9: 
205.   
206.       if (prompt) {
207. >         prompt_copy = OPENSSL_strdup(prompt);
208.           if (prompt_copy == NULL) {
209.               UIerr(UI_F_UI_DUP_INPUT_STRING, ERR_R_MALLOC_FAILURE);

crypto/o_str.c:28:1: start of procedure CRYPTO_strdup()
  26.   }
  27.   
  28. > char *CRYPTO_strdup(const char *str, const char* file, int line)
  29.   {
  30.       char *ret;

crypto/o_str.c:33:9: Taking false branch
  31.       size_t size;
  32.   
  33.       if (str == NULL)
                ^
  34.           return NULL;
  35.       size = strlen(str) + 1;

crypto/o_str.c:35:5: 
  33.       if (str == NULL)
  34.           return NULL;
  35. >     size = strlen(str) + 1;
  36.       ret = CRYPTO_malloc(size, file, line);
  37.       if (ret != NULL)

crypto/o_str.c:36:5: 
  34.           return NULL;
  35.       size = strlen(str) + 1;
  36. >     ret = CRYPTO_malloc(size, file, line);
  37.       if (ret != NULL)
  38.           memcpy(ret, str, size);

crypto/mem.c:71:1: start of procedure CRYPTO_malloc()
    69.   }
    70.   
    71. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    72.   {
    73.       void *ret = NULL;

crypto/mem.c:73:5: 
    71.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    72.   {
    73. >     void *ret = NULL;
    74.   
    75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:75:9: Taking false branch
    73.       void *ret = NULL;
    74.   
    75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                  ^
    76.           return malloc_impl(num, file, line);
    77.   

crypto/mem.c:78:9: Taking false branch
    76.           return malloc_impl(num, file, line);
    77.   
    78.       if (num <= 0)
                  ^
    79.           return NULL;
    80.   

crypto/mem.c:81:5: 
    79.           return NULL;
    80.   
    81. >     allow_customize = 0;
    82.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    83.       if (call_malloc_debug) {

crypto/mem.c:91:5: 
    89.       }
    90.   #else
    91. >     osslargused(file); osslargused(line);
    92.       ret = malloc(num);
    93.   #endif

crypto/mem.c:91:24: 
    89.       }
    90.   #else
    91. >     osslargused(file); osslargused(line);
    92.       ret = malloc(num);
    93.   #endif

crypto/mem.c:92:5: 
    90.   #else
    91.       osslargused(file); osslargused(line);
    92. >     ret = malloc(num);
    93.   #endif
    94.   

crypto/mem.c:95:5: 
    93.   #endif
    94.   
    95. >     return ret;
    96.   }
    97.   

crypto/mem.c:96:1: return from a call to CRYPTO_malloc
    94.   
    95.       return ret;
    96. > }
    97.   
    98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/o_str.c:37:9: Taking true branch
  35.       size = strlen(str) + 1;
  36.       ret = CRYPTO_malloc(size, file, line);
  37.       if (ret != NULL)
                ^
  38.           memcpy(ret, str, size);
  39.       return ret;

crypto/o_str.c:38:9: 
  36.       ret = CRYPTO_malloc(size, file, line);
  37.       if (ret != NULL)
  38. >         memcpy(ret, str, size);
  39.       return ret;
  40.   }

crypto/o_str.c:39:5: 
  37.       if (ret != NULL)
  38.           memcpy(ret, str, size);
  39. >     return ret;
  40.   }
  41.   

crypto/o_str.c:40:1: return from a call to CRYPTO_strdup
  38.           memcpy(ret, str, size);
  39.       return ret;
  40. > }
  41.   
  42.   char *CRYPTO_strndup(const char *str, size_t s, const char* file, int line)

crypto/ui/ui_lib.c:208:13: Taking false branch
206.       if (prompt) {
207.           prompt_copy = OPENSSL_strdup(prompt);
208.           if (prompt_copy == NULL) {
                   ^
209.               UIerr(UI_F_UI_DUP_INPUT_STRING, ERR_R_MALLOC_FAILURE);
210.               return 0;

crypto/ui/ui_lib.c:214:5: 
212.       }
213.   
214. >     return general_allocate_string(ui, prompt_copy, 1,
215.                                      UIT_PROMPT, flags, result_buf, minsize,
216.                                      maxsize, NULL);

crypto/ui/ui_lib.c:113:1: start of procedure general_allocate_string()
  111.   }
  112.   
  113. > static int general_allocate_string(UI *ui, const char *prompt,
  114.                                      int prompt_freeable,
  115.                                      enum UI_string_types type, int input_flags,

crypto/ui/ui_lib.c:119:5: 
  117.                                      const char *test_buf)
  118.   {
  119. >     int ret = -1;
  120.       UI_STRING *s = general_allocate_prompt(ui, prompt, prompt_freeable,
  121.                                              type, input_flags, result_buf);

crypto/ui/ui_lib.c:120:5: Skipping general_allocate_prompt(): empty list of specs
  118.   {
  119.       int ret = -1;
  120.       UI_STRING *s = general_allocate_prompt(ui, prompt, prompt_freeable,
             ^
  121.                                              type, input_flags, result_buf);
  122.   

crypto/ui/ui_lib.c:123:9: Taking false branch
  121.                                              type, input_flags, result_buf);
  122.   
  123.       if (s) {
                 ^
  124.           if (allocate_string_stack(ui) >= 0) {
  125.               s->_.string_data.result_minsize = minsize;

crypto/ui/ui_lib.c:137:5: 
  135.               free_string(s);
  136.       }
  137. >     return ret;
  138.   }
  139.   

crypto/ui/ui_lib.c:138:1: return from a call to general_allocate_string
  136.       }
  137.       return ret;
  138. > }
  139.   
  140.   static int general_allocate_boolean(UI *ui,
