test/exdatatest.c:206: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_strdup()` at line 195, column 9 is not reachable after line 206, column 10.
Showing all 42 steps of the trace


test/exdatatest.c:186:1: start of procedure test_exdata()
184.   }
185.   
186. > static int test_exdata(void)
187.   {
188.       MYOBJ *t1, *t2, *t3;

test/exdatatest.c:193:5: 
191.       char *p;
192.   
193. >     gbl_result = 1;
194.   
195.       p = OPENSSL_strdup("hello world");

test/exdatatest.c:195:5: 
193.       gbl_result = 1;
194.   
195. >     p = OPENSSL_strdup("hello world");
196.       saved_argl = 21;
197.       saved_argp = OPENSSL_malloc(1);

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

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

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

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

crypto/mem.c:169:1: start of procedure CRYPTO_malloc()
    167.   #endif
    168.   
    169. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    170.   {
    171.       void *ret = NULL;

crypto/mem.c:171:5: 
    169.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    170.   {
    171. >     void *ret = NULL;
    172.   
    173.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:173:9: Taking false branch
    171.       void *ret = NULL;
    172.   
    173.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    174.           return malloc_impl(num, file, line);
    175.   

crypto/mem.c:176:9: Taking false branch
    174.           return malloc_impl(num, file, line);
    175.   
    176.       if (num == 0)
                   ^
    177.           return NULL;
    178.   

crypto/mem.c:180:5: 
    178.   
    179.       FAILTEST();
    180. >     allow_customize = 0;
    181.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    182.       if (call_malloc_debug) {

crypto/mem.c:190:5: 
    188.       }
    189.   #else
    190. >     (void)(file); (void)(line);
    191.       ret = malloc(num);
    192.   #endif

crypto/mem.c:190:19: 
    188.       }
    189.   #else
    190. >     (void)(file); (void)(line);
    191.       ret = malloc(num);
    192.   #endif

crypto/mem.c:191:5: 
    189.   #else
    190.       (void)(file); (void)(line);
    191. >     ret = malloc(num);
    192.   #endif
    193.   

crypto/mem.c:194:5: 
    192.   #endif
    193.   
    194. >     return ret;
    195.   }
    196.   

crypto/mem.c:195:1: return from a call to CRYPTO_malloc
    193.   
    194.       return ret;
    195. > }
    196.   
    197.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

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

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

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

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

test/exdatatest.c:196:5: 
194.   
195.       p = OPENSSL_strdup("hello world");
196. >     saved_argl = 21;
197.       saved_argp = OPENSSL_malloc(1);
198.       saved_idx = CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_APP,

test/exdatatest.c:197:5: 
195.       p = OPENSSL_strdup("hello world");
196.       saved_argl = 21;
197. >     saved_argp = OPENSSL_malloc(1);
198.       saved_idx = CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_APP,
199.                                           saved_argl, saved_argp,

crypto/mem.c:169:1: start of procedure CRYPTO_malloc()
  167.   #endif
  168.   
  169. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  170.   {
  171.       void *ret = NULL;

crypto/mem.c:171:5: 
  169.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  170.   {
  171. >     void *ret = NULL;
  172.   
  173.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:173:9: Taking false branch
  171.       void *ret = NULL;
  172.   
  173.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                 ^
  174.           return malloc_impl(num, file, line);
  175.   

crypto/mem.c:176:9: Taking false branch
  174.           return malloc_impl(num, file, line);
  175.   
  176.       if (num == 0)
                 ^
  177.           return NULL;
  178.   

crypto/mem.c:180:5: 
  178.   
  179.       FAILTEST();
  180. >     allow_customize = 0;
  181.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
  182.       if (call_malloc_debug) {

crypto/mem.c:190:5: 
  188.       }
  189.   #else
  190. >     (void)(file); (void)(line);
  191.       ret = malloc(num);
  192.   #endif

crypto/mem.c:190:19: 
  188.       }
  189.   #else
  190. >     (void)(file); (void)(line);
  191.       ret = malloc(num);
  192.   #endif

crypto/mem.c:191:5: 
  189.   #else
  190.       (void)(file); (void)(line);
  191. >     ret = malloc(num);
  192.   #endif
  193.   

crypto/mem.c:194:5: 
  192.   #endif
  193.   
  194. >     return ret;
  195.   }
  196.   

crypto/mem.c:195:1: return from a call to CRYPTO_malloc
  193.   
  194.       return ret;
  195. > }
  196.   
  197.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

test/exdatatest.c:198:5: Skipping CRYPTO_get_ex_new_index(): empty list of specs
196.       saved_argl = 21;
197.       saved_argp = OPENSSL_malloc(1);
198.       saved_idx = CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_APP,
           ^
199.                                           saved_argl, saved_argp,
200.                                           exnew, exdup, exfree);

test/exdatatest.c:201:5: Skipping CRYPTO_get_ex_new_index(): empty list of specs
199.                                           saved_argl, saved_argp,
200.                                           exnew, exdup, exfree);
201.       saved_idx2 = CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_APP,
           ^
202.                                            saved_argl, saved_argp,
203.                                            exnew2, exdup2, exfree2);

test/exdatatest.c:204:5: Skipping MYOBJ_new(): empty list of specs
202.                                            saved_argl, saved_argp,
203.                                            exnew2, exdup2, exfree2);
204.       t1 = MYOBJ_new();
           ^
205.       t2 = MYOBJ_new();
206.       if (!TEST_int_eq(t1->st, 1) || !TEST_int_eq(t2->st, 1))

test/exdatatest.c:205:5: Skipping MYOBJ_new(): empty list of specs
203.                                            exnew2, exdup2, exfree2);
204.       t1 = MYOBJ_new();
205.       t2 = MYOBJ_new();
           ^
206.       if (!TEST_int_eq(t1->st, 1) || !TEST_int_eq(t2->st, 1))
207.           return 0;

test/exdatatest.c:206:10: 
204.       t1 = MYOBJ_new();
205.       t2 = MYOBJ_new();
206. >     if (!TEST_int_eq(t1->st, 1) || !TEST_int_eq(t2->st, 1))
207.           return 0;
208.       if (!TEST_ptr(CRYPTO_get_ex_data(&t1->ex_data, saved_idx2)))

test/testutil/tests.c:208:1: start of procedure test_int_eq()
  206.       DEFINE_COMPARISON(type, name, ge, >=, fmt)
  207.   
  208. > DEFINE_COMPARISONS(int, int, "%d")
  209.   DEFINE_COMPARISONS(unsigned int, uint, "%u")
  210.   DEFINE_COMPARISONS(char, char, "%c")

test/testutil/tests.c:208:1: Taking false branch
  206.       DEFINE_COMPARISON(type, name, ge, >=, fmt)
  207.   
  208. > DEFINE_COMPARISONS(int, int, "%d")
  209.   DEFINE_COMPARISONS(unsigned int, uint, "%u")
  210.   DEFINE_COMPARISONS(char, char, "%c")

test/testutil/tests.c:208:1: return from a call to test_int_eq
  206.       DEFINE_COMPARISON(type, name, ge, >=, fmt)
  207.   
  208. > DEFINE_COMPARISONS(int, int, "%d")
  209.   DEFINE_COMPARISONS(unsigned int, uint, "%u")
  210.   DEFINE_COMPARISONS(char, char, "%c")

test/exdatatest.c:206:10: Taking true branch
204.       t1 = MYOBJ_new();
205.       t2 = MYOBJ_new();
206.       if (!TEST_int_eq(t1->st, 1) || !TEST_int_eq(t2->st, 1))
                ^
207.           return 0;
208.       if (!TEST_ptr(CRYPTO_get_ex_data(&t1->ex_data, saved_idx2)))
