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


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

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

apps/apps.c:1859:5: 
1857.       int rv;
1858.       char *stmp, *vtmp = NULL;
1859. >     stmp = OPENSSL_strdup(value);
1860.       if (!stmp)
1861.           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:31:9: Taking false branch
  29.       char *ret;
  30.   
  31.       if (str == NULL)
                ^
  32.           return NULL;
  33.       ret = CRYPTO_malloc(strlen(str) + 1, file, line);

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

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

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

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

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

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

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

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

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

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

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

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

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

crypto/o_str.c:36:5: 
  34.       if (ret != NULL)
  35.           strcpy(ret, str);
  36. >     return ret;
  37.   }
  38.   

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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