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


apps/apps.c:1837:1: start of procedure pkey_ctrl_string()
1835.   }
1836.   
1837. > int pkey_ctrl_string(EVP_PKEY_CTX *ctx, const char *value)
1838.   {
1839.       int rv;

apps/apps.c:1840:5: 
1838.   {
1839.       int rv;
1840. >     char *stmp, *vtmp = NULL;
1841.       stmp = OPENSSL_strdup(value);
1842.       if (!stmp)

apps/apps.c:1841:5: 
1839.       int rv;
1840.       char *stmp, *vtmp = NULL;
1841. >     stmp = OPENSSL_strdup(value);
1842.       if (!stmp)
1843.           return -1;

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)

apps/apps.c:1842:10: Taking false branch
1840.       char *stmp, *vtmp = NULL;
1841.       stmp = OPENSSL_strdup(value);
1842.       if (!stmp)
                 ^
1843.           return -1;
1844.       vtmp = strchr(stmp, ':');

apps/apps.c:1844:5: 
1842.       if (!stmp)
1843.           return -1;
1844. >     vtmp = strchr(stmp, ':');
1845.       if (vtmp) {
1846.           *vtmp = 0;

apps/apps.c:1845:9: Taking false branch
1843.           return -1;
1844.       vtmp = strchr(stmp, ':');
1845.       if (vtmp) {
                ^
1846.           *vtmp = 0;
1847.           vtmp++;

apps/apps.c:1849:5: 
1847.           vtmp++;
1848.       }
1849. >     rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp);
1850.       OPENSSL_free(stmp);
1851.       return rv;

crypto/evp/pmeth_lib.c:334:1: start of procedure EVP_PKEY_CTX_ctrl_str()
  332.   }
  333.   
  334. > int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx,
  335.                             const char *name, const char *value)
  336.   {

crypto/evp/pmeth_lib.c:337:10: Taking false branch
  335.                             const char *name, const char *value)
  336.   {
  337.       if (!ctx || !ctx->pmeth || !ctx->pmeth->ctrl_str) {
                  ^
  338.           EVPerr(EVP_F_EVP_PKEY_CTX_CTRL_STR, EVP_R_COMMAND_NOT_SUPPORTED);
  339.           return -2;

crypto/evp/pmeth_lib.c:337:18: Taking false branch
  335.                             const char *name, const char *value)
  336.   {
  337.       if (!ctx || !ctx->pmeth || !ctx->pmeth->ctrl_str) {
                          ^
  338.           EVPerr(EVP_F_EVP_PKEY_CTX_CTRL_STR, EVP_R_COMMAND_NOT_SUPPORTED);
  339.           return -2;

crypto/evp/pmeth_lib.c:337:33: Taking false branch
  335.                             const char *name, const char *value)
  336.   {
  337.       if (!ctx || !ctx->pmeth || !ctx->pmeth->ctrl_str) {
                                         ^
  338.           EVPerr(EVP_F_EVP_PKEY_CTX_CTRL_STR, EVP_R_COMMAND_NOT_SUPPORTED);
  339.           return -2;

crypto/evp/pmeth_lib.c:341:9: Taking false branch
  339.           return -2;
  340.       }
  341.       if (strcmp(name, "digest") == 0)
                 ^
  342.           return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_TYPE_SIG, EVP_PKEY_CTRL_MD,
  343.                                  value);

crypto/evp/pmeth_lib.c:344:5: Skipping __function_pointer__(): unresolved function pointer
  342.           return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_TYPE_SIG, EVP_PKEY_CTRL_MD,
  343.                                  value);
  344.       return ctx->pmeth->ctrl_str(ctx, name, value);
             ^
  345.   }
  346.   

crypto/evp/pmeth_lib.c:345:1: return from a call to EVP_PKEY_CTX_ctrl_str
  343.                                  value);
  344.       return ctx->pmeth->ctrl_str(ctx, name, value);
  345. > }
  346.   
  347.   /* Utility functions to send a string of hex string to a ctrl */

apps/apps.c:1850:5: 
1848.       }
1849.       rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp);
1850. >     OPENSSL_free(stmp);
1851.       return rv;
1852.   }

crypto/mem.c:253:1: start of procedure CRYPTO_free()
  251.   }
  252.   
  253. > void CRYPTO_free(void *str, const char *file, int line)
  254.   {
  255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:255:9: Taking true branch
  253.   void CRYPTO_free(void *str, const char *file, int line)
  254.   {
  255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                 ^
  256.           free_impl(str, file, line);
  257.           return;

crypto/mem.c:255:30: Taking true branch
  253.   void CRYPTO_free(void *str, const char *file, int line)
  254.   {
  255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                      ^
  256.           free_impl(str, file, line);
  257.           return;

crypto/mem.c:256:9: Skipping __function_pointer__(): unresolved function pointer
  254.   {
  255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  256.           free_impl(str, file, line);
                 ^
  257.           return;
  258.       }

crypto/mem.c:257:9: 
  255.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  256.           free_impl(str, file, line);
  257. >         return;
  258.       }
  259.   

crypto/mem.c:271:1: return from a call to CRYPTO_free
  269.       free(str);
  270.   #endif
  271. > }
  272.   
  273.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)
