apps/apps.c:1870: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_strdup()` at line 1861, column 12 is not reachable after line 1870, column 5.
Showing all 39 steps of the trace


apps/apps.c:1857:1: start of procedure pkey_ctrl_string()
1855.   }
1856.   
1857. > int pkey_ctrl_string(EVP_PKEY_CTX *ctx, const char *value)
1858.   {
1859.       int rv;

apps/apps.c:1860:5: 
1858.   {
1859.       int rv;
1860. >     char *stmp, *vtmp = NULL;
1861.       stmp = OPENSSL_strdup(value);
1862.       if (!stmp)

apps/apps.c:1861:5: 
1859.       int rv;
1860.       char *stmp, *vtmp = NULL;
1861. >     stmp = OPENSSL_strdup(value);
1862.       if (!stmp)
1863.           return -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)

apps/apps.c:1862:10: Taking false branch
1860.       char *stmp, *vtmp = NULL;
1861.       stmp = OPENSSL_strdup(value);
1862.       if (!stmp)
                 ^
1863.           return -1;
1864.       vtmp = strchr(stmp, ':');

apps/apps.c:1864:5: 
1862.       if (!stmp)
1863.           return -1;
1864. >     vtmp = strchr(stmp, ':');
1865.       if (vtmp) {
1866.           *vtmp = 0;

apps/apps.c:1865:9: Taking false branch
1863.           return -1;
1864.       vtmp = strchr(stmp, ':');
1865.       if (vtmp) {
                ^
1866.           *vtmp = 0;
1867.           vtmp++;

apps/apps.c:1869:5: 
1867.           vtmp++;
1868.       }
1869. >     rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp);
1870.       OPENSSL_free(stmp);
1871.       return rv;

crypto/evp/pmeth_lib.c:368:1: start of procedure EVP_PKEY_CTX_ctrl_str()
  366.   }
  367.   
  368. > int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx,
  369.                             const char *name, const char *value)
  370.   {

crypto/evp/pmeth_lib.c:371:10: Taking false branch
  369.                             const char *name, const char *value)
  370.   {
  371.       if (!ctx || !ctx->pmeth || !ctx->pmeth->ctrl_str) {
                  ^
  372.           EVPerr(EVP_F_EVP_PKEY_CTX_CTRL_STR, EVP_R_COMMAND_NOT_SUPPORTED);
  373.           return -2;

crypto/evp/pmeth_lib.c:371:18: Taking false branch
  369.                             const char *name, const char *value)
  370.   {
  371.       if (!ctx || !ctx->pmeth || !ctx->pmeth->ctrl_str) {
                          ^
  372.           EVPerr(EVP_F_EVP_PKEY_CTX_CTRL_STR, EVP_R_COMMAND_NOT_SUPPORTED);
  373.           return -2;

crypto/evp/pmeth_lib.c:371:33: Taking false branch
  369.                             const char *name, const char *value)
  370.   {
  371.       if (!ctx || !ctx->pmeth || !ctx->pmeth->ctrl_str) {
                                         ^
  372.           EVPerr(EVP_F_EVP_PKEY_CTX_CTRL_STR, EVP_R_COMMAND_NOT_SUPPORTED);
  373.           return -2;

crypto/evp/pmeth_lib.c:375:9: Taking false branch
  373.           return -2;
  374.       }
  375.       if (strcmp(name, "digest") == 0)
                 ^
  376.           return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_TYPE_SIG, EVP_PKEY_CTRL_MD,
  377.                                  value);

crypto/evp/pmeth_lib.c:378:5: Skipping __function_pointer__(): unresolved function pointer
  376.           return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_TYPE_SIG, EVP_PKEY_CTRL_MD,
  377.                                  value);
  378.       return ctx->pmeth->ctrl_str(ctx, name, value);
             ^
  379.   }
  380.   

crypto/evp/pmeth_lib.c:379:1: return from a call to EVP_PKEY_CTX_ctrl_str
  377.                                  value);
  378.       return ctx->pmeth->ctrl_str(ctx, name, value);
  379. > }
  380.   
  381.   /* Utility functions to send a string of hex string to a ctrl */

apps/apps.c:1870:5: 
1868.       }
1869.       rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp);
1870. >     OPENSSL_free(stmp);
1871.       return rv;
1872.   }

crypto/mem.c:264:1: start of procedure CRYPTO_free()
  262.   }
  263.   
  264. > void CRYPTO_free(void *str, const char *file, int line)
  265.   {
  266.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:266:9: Taking true branch
  264.   void CRYPTO_free(void *str, const char *file, int line)
  265.   {
  266.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                 ^
  267.           free_impl(str, file, line);
  268.           return;

crypto/mem.c:266:30: Taking true branch
  264.   void CRYPTO_free(void *str, const char *file, int line)
  265.   {
  266.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                      ^
  267.           free_impl(str, file, line);
  268.           return;

crypto/mem.c:267:9: Skipping __function_pointer__(): unresolved function pointer
  265.   {
  266.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  267.           free_impl(str, file, line);
                 ^
  268.           return;
  269.       }

crypto/mem.c:268:9: 
  266.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  267.           free_impl(str, file, line);
  268. >         return;
  269.       }
  270.   

crypto/mem.c:282:1: return from a call to CRYPTO_free
  280.       free(str);
  281.   #endif
  282. > }
  283.   
  284.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)
