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


crypto/ui/ui_lib.c:261:1: start of procedure UI_dup_verify_string()
259.   }
260.   
261. > int UI_dup_verify_string(UI *ui, const char *prompt, int flags,
262.                            char *result_buf, int minsize, int maxsize,
263.                            const char *test_buf)

crypto/ui/ui_lib.c:265:5: 
263.                            const char *test_buf)
264.   {
265. >     char *prompt_copy = NULL;
266.   
267.       if (prompt) {

crypto/ui/ui_lib.c:267:9: Taking true branch
265.       char *prompt_copy = NULL;
266.   
267.       if (prompt) {
               ^
268.           prompt_copy = OPENSSL_strdup(prompt);
269.           if (prompt_copy == NULL) {

crypto/ui/ui_lib.c:268:9: 
266.   
267.       if (prompt) {
268. >         prompt_copy = OPENSSL_strdup(prompt);
269.           if (prompt_copy == NULL) {
270.               UIerr(UI_F_UI_DUP_VERIFY_STRING, ERR_R_MALLOC_FAILURE);

crypto/o_str.c:120:1: start of procedure CRYPTO_strdup()
  118.   }
  119.   
  120. > char *CRYPTO_strdup(const char *str, const char* file, int line)
  121.   {
  122.       char *ret;

crypto/o_str.c:125:9: Taking false branch
  123.       size_t size;
  124.   
  125.       if (str == NULL)
                 ^
  126.           return NULL;
  127.       size = strlen(str) + 1;

crypto/o_str.c:127:5: 
  125.       if (str == NULL)
  126.           return NULL;
  127. >     size = strlen(str) + 1;
  128.       ret = CRYPTO_malloc(size, file, line);
  129.       if (ret != NULL)

crypto/o_str.c:128:5: 
  126.           return NULL;
  127.       size = strlen(str) + 1;
  128. >     ret = CRYPTO_malloc(size, file, line);
  129.       if (ret != NULL)
  130.           memcpy(ret, str, size);

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
    117.   }
    118.   
    119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    120.   {
    121.       void *ret = NULL;

crypto/mem.c:121:5: 
    119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    120.   {
    121. >     void *ret = NULL;
    122.   
    123.       if (num <= 0)

crypto/mem.c:123:9: Taking false branch
    121.       void *ret = NULL;
    122.   
    123.       if (num <= 0)
                   ^
    124.           return NULL;
    125.   

crypto/mem.c:126:5: 
    124.           return NULL;
    125.   
    126. >     allow_customize = 0;
    127.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    128.       if (call_malloc_debug) {

crypto/mem.c:136:5: 
    134.       }
    135.   #else
    136. >     (void)file;
    137.       (void)line;
    138.       ret = malloc(num);

crypto/mem.c:137:5: 
    135.   #else
    136.       (void)file;
    137. >     (void)line;
    138.       ret = malloc(num);
    139.   #endif

crypto/mem.c:138:5: 
    136.       (void)file;
    137.       (void)line;
    138. >     ret = malloc(num);
    139.   #endif
    140.   

crypto/mem.c:153:5: 
    151.   #endif
    152.   
    153. >     return ret;
    154.   }
    155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
    152.   
    153.       return ret;
    154. > }
    155.   
    156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/o_str.c:129:9: Taking true branch
  127.       size = strlen(str) + 1;
  128.       ret = CRYPTO_malloc(size, file, line);
  129.       if (ret != NULL)
                 ^
  130.           memcpy(ret, str, size);
  131.       return ret;

crypto/o_str.c:130:9: 
  128.       ret = CRYPTO_malloc(size, file, line);
  129.       if (ret != NULL)
  130. >         memcpy(ret, str, size);
  131.       return ret;
  132.   }

crypto/o_str.c:131:5: 
  129.       if (ret != NULL)
  130.           memcpy(ret, str, size);
  131. >     return ret;
  132.   }
  133.   

crypto/o_str.c:132:1: return from a call to CRYPTO_strdup
  130.           memcpy(ret, str, size);
  131.       return ret;
  132. > }
  133.   
  134.   char *CRYPTO_strndup(const char *str, size_t s, const char* file, int line)

crypto/ui/ui_lib.c:269:13: Taking false branch
267.       if (prompt) {
268.           prompt_copy = OPENSSL_strdup(prompt);
269.           if (prompt_copy == NULL) {
                   ^
270.               UIerr(UI_F_UI_DUP_VERIFY_STRING, ERR_R_MALLOC_FAILURE);
271.               return -1;

crypto/ui/ui_lib.c:275:5: Skipping general_allocate_string(): empty list of specs
273.       }
274.   
275.       return general_allocate_string(ui, prompt_copy, 1,
           ^
276.                                      UIT_VERIFY, flags, result_buf, minsize,
277.                                      maxsize, test_buf);
