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


apps/apps.c:1907:1: start of procedure pkey_ctrl_string()
1905.   }
1906.   
1907. > int pkey_ctrl_string(EVP_PKEY_CTX *ctx, const char *value)
1908.   {
1909.       int rv;

apps/apps.c:1910:5: 
1908.   {
1909.       int rv;
1910. >     char *stmp, *vtmp = NULL;
1911.       stmp = OPENSSL_strdup(value);
1912.       if (!stmp)

apps/apps.c:1911:5: 
1909.       int rv;
1910.       char *stmp, *vtmp = NULL;
1911. >     stmp = OPENSSL_strdup(value);
1912.       if (!stmp)
1913.           return -1;

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 (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:123:9: Taking false branch
    121.       void *ret = NULL;
    122.   
    123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    124.           return malloc_impl(num, file, line);
    125.   

crypto/mem.c:126:9: Taking false branch
    124.           return malloc_impl(num, file, line);
    125.   
    126.       if (num <= 0)
                   ^
    127.           return NULL;
    128.   

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

crypto/mem.c:139:5: 
    137.       }
    138.   #else
    139. >     osslargused(file); osslargused(line);
    140.       ret = malloc(num);
    141.   #endif

crypto/mem.c:139:24: 
    137.       }
    138.   #else
    139. >     osslargused(file); osslargused(line);
    140.       ret = malloc(num);
    141.   #endif

crypto/mem.c:140:5: 
    138.   #else
    139.       osslargused(file); osslargused(line);
    140. >     ret = malloc(num);
    141.   #endif
    142.   

crypto/mem.c:143:5: 
    141.   #endif
    142.   
    143. >     return ret;
    144.   }
    145.   

crypto/mem.c:144:1: return from a call to CRYPTO_malloc
    142.   
    143.       return ret;
    144. > }
    145.   
    146.   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)

apps/apps.c:1912:10: Taking false branch
1910.       char *stmp, *vtmp = NULL;
1911.       stmp = OPENSSL_strdup(value);
1912.       if (!stmp)
                 ^
1913.           return -1;
1914.       vtmp = strchr(stmp, ':');

apps/apps.c:1914:5: 
1912.       if (!stmp)
1913.           return -1;
1914. >     vtmp = strchr(stmp, ':');
1915.       if (vtmp) {
1916.           *vtmp = 0;

apps/apps.c:1915:9: Taking false branch
1913.           return -1;
1914.       vtmp = strchr(stmp, ':');
1915.       if (vtmp) {
                ^
1916.           *vtmp = 0;
1917.           vtmp++;

apps/apps.c:1919:5: 
1917.           vtmp++;
1918.       }
1919. >     rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp);
1920.       OPENSSL_free(stmp);
1921.       return rv;

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

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

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

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

crypto/evp/pmeth_lib.c:376:9: Taking false branch
  374.           return -2;
  375.       }
  376.       if (strcmp(name, "digest") == 0) {
                 ^
  377.           const EVP_MD *md;
  378.           if (value == NULL || (md = EVP_get_digestbyname(value)) == NULL) {

crypto/evp/pmeth_lib.c:384:5: Skipping __function_pointer__(): unresolved function pointer
  382.           return EVP_PKEY_CTX_set_signature_md(ctx, md);
  383.       }
  384.       return ctx->pmeth->ctrl_str(ctx, name, value);
             ^
  385.   }
  386.   

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

apps/apps.c:1920:5: 
1918.       }
1919.       rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp);
1920. >     OPENSSL_free(stmp);
1921.       return rv;
1922.   }

crypto/mem.c:210:1: start of procedure CRYPTO_free()
  208.   }
  209.   
  210. > void CRYPTO_free(void *str, const char *file, int line)
  211.   {
  212.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:212:9: Taking true branch
  210.   void CRYPTO_free(void *str, const char *file, int line)
  211.   {
  212.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                 ^
  213.           free_impl(str, file, line);
  214.           return;

crypto/mem.c:212:30: Taking true branch
  210.   void CRYPTO_free(void *str, const char *file, int line)
  211.   {
  212.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                      ^
  213.           free_impl(str, file, line);
  214.           return;

crypto/mem.c:213:9: Skipping __function_pointer__(): unresolved function pointer
  211.   {
  212.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  213.           free_impl(str, file, line);
                 ^
  214.           return;
  215.       }

crypto/mem.c:214:9: 
  212.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  213.           free_impl(str, file, line);
  214. >         return;
  215.       }
  216.   

crypto/mem.c:228:1: return from a call to CRYPTO_free
  226.       free(str);
  227.   #endif
  228. > }
  229.   
  230.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)
