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


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

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

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

crypto/ui/ui_lib.c:203:9: 
201.   
202.       if (prompt) {
203. >         prompt_copy = OPENSSL_strdup(prompt);
204.           if (prompt_copy == NULL) {
205.               UIerr(UI_F_UI_DUP_INPUT_STRING, ERR_R_MALLOC_FAILURE);

crypto/o_str.c:71:1: start of procedure CRYPTO_strdup()
  69.   }
  70.   
  71. > char *CRYPTO_strdup(const char *str, const char* file, int line)
  72.   {
  73.       char *ret;

crypto/o_str.c:76:9: Taking false branch
  74.       size_t size;
  75.   
  76.       if (str == NULL)
                ^
  77.           return NULL;
  78.       size = strlen(str) + 1;

crypto/o_str.c:78:5: 
  76.       if (str == NULL)
  77.           return NULL;
  78. >     size = strlen(str) + 1;
  79.       ret = CRYPTO_malloc(size, file, line);
  80.       if (ret != NULL)

crypto/o_str.c:79:5: 
  77.           return NULL;
  78.       size = strlen(str) + 1;
  79. >     ret = CRYPTO_malloc(size, file, line);
  80.       if (ret != NULL)
  81.           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:80:9: Taking true branch
  78.       size = strlen(str) + 1;
  79.       ret = CRYPTO_malloc(size, file, line);
  80.       if (ret != NULL)
                ^
  81.           memcpy(ret, str, size);
  82.       return ret;

crypto/o_str.c:81:9: 
  79.       ret = CRYPTO_malloc(size, file, line);
  80.       if (ret != NULL)
  81. >         memcpy(ret, str, size);
  82.       return ret;
  83.   }

crypto/o_str.c:82:5: 
  80.       if (ret != NULL)
  81.           memcpy(ret, str, size);
  82. >     return ret;
  83.   }
  84.   

crypto/o_str.c:83:1: return from a call to CRYPTO_strdup
  81.           memcpy(ret, str, size);
  82.       return ret;
  83. > }
  84.   
  85.   char *CRYPTO_strndup(const char *str, size_t s, const char* file, int line)

crypto/ui/ui_lib.c:204:13: Taking false branch
202.       if (prompt) {
203.           prompt_copy = OPENSSL_strdup(prompt);
204.           if (prompt_copy == NULL) {
                   ^
205.               UIerr(UI_F_UI_DUP_INPUT_STRING, ERR_R_MALLOC_FAILURE);
206.               return 0;

crypto/ui/ui_lib.c:210:5: 
208.       }
209.   
210. >     return general_allocate_string(ui, prompt_copy, 1,
211.                                      UIT_PROMPT, flags, result_buf, minsize,
212.                                      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:135:5: 
  133.               free_string(s);
  134.       }
  135. >     return ret;
  136.   }
  137.   

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