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


crypto/ui/ui_lib.c:233:1: start of procedure UI_dup_verify_string()
231.   }
232.   
233. > int UI_dup_verify_string(UI *ui, const char *prompt, int flags,
234.                            char *result_buf, int minsize, int maxsize,
235.                            const char *test_buf)

crypto/ui/ui_lib.c:237:5: 
235.                            const char *test_buf)
236.   {
237. >     char *prompt_copy = NULL;
238.   
239.       if (prompt != NULL) {

crypto/ui/ui_lib.c:239:9: Taking true branch
237.       char *prompt_copy = NULL;
238.   
239.       if (prompt != NULL) {
               ^
240.           prompt_copy = OPENSSL_strdup(prompt);
241.           if (prompt_copy == NULL) {

crypto/ui/ui_lib.c:240:9: 
238.   
239.       if (prompt != NULL) {
240. >         prompt_copy = OPENSSL_strdup(prompt);
241.           if (prompt_copy == NULL) {
242.               UIerr(UI_F_UI_DUP_VERIFY_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:158:1: start of procedure CRYPTO_malloc()
    156.   #endif
    157.   
    158. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    159.   {
    160.       void *ret = NULL;

crypto/mem.c:160:5: 
    158.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    159.   {
    160. >     void *ret = NULL;
    161.   
    162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:162:9: Taking false branch
    160.       void *ret = NULL;
    161.   
    162.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    163.           return malloc_impl(num, file, line);
    164.   

crypto/mem.c:165:9: Taking false branch
    163.           return malloc_impl(num, file, line);
    164.   
    165.       if (num == 0)
                   ^
    166.           return NULL;
    167.   

crypto/mem.c:169:5: 
    167.   
    168.       FAILTEST();
    169. >     allow_customize = 0;
    170.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    171.       if (call_malloc_debug) {

crypto/mem.c:179:5: 
    177.       }
    178.   #else
    179. >     osslargused(file); osslargused(line);
    180.       ret = malloc(num);
    181.   #endif

crypto/mem.c:179:24: 
    177.       }
    178.   #else
    179. >     osslargused(file); osslargused(line);
    180.       ret = malloc(num);
    181.   #endif

crypto/mem.c:180:5: 
    178.   #else
    179.       osslargused(file); osslargused(line);
    180. >     ret = malloc(num);
    181.   #endif
    182.   

crypto/mem.c:183:5: 
    181.   #endif
    182.   
    183. >     return ret;
    184.   }
    185.   

crypto/mem.c:184:1: return from a call to CRYPTO_malloc
    182.   
    183.       return ret;
    184. > }
    185.   
    186.   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:241:13: Taking false branch
239.       if (prompt != NULL) {
240.           prompt_copy = OPENSSL_strdup(prompt);
241.           if (prompt_copy == NULL) {
                   ^
242.               UIerr(UI_F_UI_DUP_VERIFY_STRING, ERR_R_MALLOC_FAILURE);
243.               return -1;

crypto/ui/ui_lib.c:247:5: 
245.       }
246.   
247. >     return general_allocate_string(ui, prompt_copy, 1,
248.                                      UIT_VERIFY, flags, result_buf, minsize,
249.                                      maxsize, test_buf);

crypto/ui/ui_lib.c:118:1: start of procedure general_allocate_string()
  116.   }
  117.   
  118. > static int general_allocate_string(UI *ui, const char *prompt,
  119.                                      int prompt_freeable,
  120.                                      enum UI_string_types type, int input_flags,

crypto/ui/ui_lib.c:124:5: 
  122.                                      const char *test_buf)
  123.   {
  124. >     int ret = -1;
  125.       UI_STRING *s = general_allocate_prompt(ui, prompt, prompt_freeable,
  126.                                              type, input_flags, result_buf);

crypto/ui/ui_lib.c:125:5: Skipping general_allocate_prompt(): empty list of specs
  123.   {
  124.       int ret = -1;
  125.       UI_STRING *s = general_allocate_prompt(ui, prompt, prompt_freeable,
             ^
  126.                                              type, input_flags, result_buf);
  127.   

crypto/ui/ui_lib.c:128:9: Taking false branch
  126.                                              type, input_flags, result_buf);
  127.   
  128.       if (s != NULL) {
                 ^
  129.           if (allocate_string_stack(ui) >= 0) {
  130.               s->_.string_data.result_minsize = minsize;

crypto/ui/ui_lib.c:142:5: 
  140.               free_string(s);
  141.       }
  142. >     return ret;
  143.   }
  144.   

crypto/ui/ui_lib.c:143:1: return from a call to general_allocate_string
  141.       }
  142.       return ret;
  143. > }
  144.   
  145.   static int general_allocate_boolean(UI *ui,
