crypto/dso/dso_lib.c:219: error: MEMORY_LEAK
  memory dynamically allocated by call to `DSO_set_filename()` at line 206, column 14 is not reachable after line 219, column 10.
Showing all 44 steps of the trace


crypto/dso/dso_lib.c:177:1: start of procedure DSO_load()
175.   }
176.   
177. > DSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags)
178.   {
179.       DSO *ret;

crypto/dso/dso_lib.c:180:5: 
178.   {
179.       DSO *ret;
180. >     int allocated = 0;
181.   
182.       if (dso == NULL) {

crypto/dso/dso_lib.c:182:9: Taking false branch
180.       int allocated = 0;
181.   
182.       if (dso == NULL) {
               ^
183.           ret = DSO_new_method(meth);
184.           if (ret == NULL) {

crypto/dso/dso_lib.c:195:9: 
193.           }
194.       } else
195. >         ret = dso;
196.       /* Don't load if we're currently already loaded */
197.       if (ret->filename != NULL) {

crypto/dso/dso_lib.c:197:9: Taking false branch
195.           ret = dso;
196.       /* Don't load if we're currently already loaded */
197.       if (ret->filename != NULL) {
               ^
198.           DSOerr(DSO_F_DSO_LOAD, DSO_R_DSO_ALREADY_LOADED);
199.           goto err;

crypto/dso/dso_lib.c:205:9: Taking true branch
203.        * set.
204.        */
205.       if (filename != NULL)
               ^
206.           if (!DSO_set_filename(ret, filename)) {
207.               DSOerr(DSO_F_DSO_LOAD, DSO_R_SET_FILENAME_FAILED);

crypto/dso/dso_lib.c:206:14: 
204.        */
205.       if (filename != NULL)
206. >         if (!DSO_set_filename(ret, filename)) {
207.               DSOerr(DSO_F_DSO_LOAD, DSO_R_SET_FILENAME_FAILED);
208.               goto err;

crypto/dso/dso_lib.c:331:1: start of procedure DSO_set_filename()
  329.   }
  330.   
  331. > int DSO_set_filename(DSO *dso, const char *filename)
  332.   {
  333.       char *copied;

crypto/dso/dso_lib.c:335:10: Taking false branch
  333.       char *copied;
  334.   
  335.       if ((dso == NULL) || (filename == NULL)) {
                  ^
  336.           DSOerr(DSO_F_DSO_SET_FILENAME, ERR_R_PASSED_NULL_PARAMETER);
  337.           return (0);

crypto/dso/dso_lib.c:335:27: Taking false branch
  333.       char *copied;
  334.   
  335.       if ((dso == NULL) || (filename == NULL)) {
                                   ^
  336.           DSOerr(DSO_F_DSO_SET_FILENAME, ERR_R_PASSED_NULL_PARAMETER);
  337.           return (0);

crypto/dso/dso_lib.c:339:9: Taking false branch
  337.           return (0);
  338.       }
  339.       if (dso->loaded_filename) {
                 ^
  340.           DSOerr(DSO_F_DSO_SET_FILENAME, DSO_R_DSO_ALREADY_LOADED);
  341.           return (0);

crypto/dso/dso_lib.c:344:5: 
  342.       }
  343.       /* We'll duplicate filename */
  344. >     copied = OPENSSL_strdup(filename);
  345.       if (copied == NULL) {
  346.           DSOerr(DSO_F_DSO_SET_FILENAME, ERR_R_MALLOC_FAILURE);

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)

crypto/dso/dso_lib.c:345:9: Taking false branch
  343.       /* We'll duplicate filename */
  344.       copied = OPENSSL_strdup(filename);
  345.       if (copied == NULL) {
                 ^
  346.           DSOerr(DSO_F_DSO_SET_FILENAME, ERR_R_MALLOC_FAILURE);
  347.           return (0);

crypto/dso/dso_lib.c:349:5: 
  347.           return (0);
  348.       }
  349. >     OPENSSL_free(dso->filename);
  350.       dso->filename = copied;
  351.       return (1);

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 false 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:226:5: 
    224.       }
    225.   #else
    226. >     free(str);
    227.   #endif
    228.   }

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)

crypto/dso/dso_lib.c:350:5: 
  348.       }
  349.       OPENSSL_free(dso->filename);
  350. >     dso->filename = copied;
  351.       return (1);
  352.   }

crypto/dso/dso_lib.c:351:5: 
  349.       OPENSSL_free(dso->filename);
  350.       dso->filename = copied;
  351. >     return (1);
  352.   }
  353.   

crypto/dso/dso_lib.c:352:1: return from a call to DSO_set_filename
  350.       dso->filename = copied;
  351.       return (1);
  352. > }
  353.   
  354.   char *DSO_merge(DSO *dso, const char *filespec1, const char *filespec2)

crypto/dso/dso_lib.c:206:14: Taking false branch
204.        */
205.       if (filename != NULL)
206.           if (!DSO_set_filename(ret, filename)) {
                    ^
207.               DSOerr(DSO_F_DSO_LOAD, DSO_R_SET_FILENAME_FAILED);
208.               goto err;

crypto/dso/dso_lib.c:210:5: 
208.               goto err;
209.           }
210. >     filename = ret->filename;
211.       if (filename == NULL) {
212.           DSOerr(DSO_F_DSO_LOAD, DSO_R_NO_FILENAME);

crypto/dso/dso_lib.c:211:9: Taking false branch
209.           }
210.       filename = ret->filename;
211.       if (filename == NULL) {
               ^
212.           DSOerr(DSO_F_DSO_LOAD, DSO_R_NO_FILENAME);
213.           goto err;

crypto/dso/dso_lib.c:215:9: Taking false branch
213.           goto err;
214.       }
215.       if (ret->meth->dso_load == NULL) {
               ^
216.           DSOerr(DSO_F_DSO_LOAD, DSO_R_UNSUPPORTED);
217.           goto err;

crypto/dso/dso_lib.c:219:10: Skipping __function_pointer__(): unresolved function pointer
217.           goto err;
218.       }
219.       if (!ret->meth->dso_load(ret)) {
                ^
220.           DSOerr(DSO_F_DSO_LOAD, DSO_R_LOAD_FAILED);
221.           goto err;
