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 35 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_malloc(strlen(filename) + 1);
  345.       if (copied == NULL) {
  346.           DSOerr(DSO_F_DSO_SET_FILENAME, ERR_R_MALLOC_FAILURE);

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 (num <= 0)

crypto/mem.c:123:9: Taking false branch
    121.       void *ret = NULL;
    122.   
    123.       if (num <= 0)
                   ^
    124.           return NULL;
    125.   

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

crypto/mem.c:136:5: 
    134.       }
    135.   #else
    136. >     (void)file;
    137.       (void)line;
    138.       ret = malloc(num);

crypto/mem.c:137:5: 
    135.   #else
    136.       (void)file;
    137. >     (void)line;
    138.       ret = malloc(num);
    139.   #endif

crypto/mem.c:138:5: 
    136.       (void)file;
    137.       (void)line;
    138. >     ret = malloc(num);
    139.   #endif
    140.   

crypto/mem.c:153:5: 
    151.   #endif
    152.   
    153. >     return ret;
    154.   }
    155.   

crypto/mem.c:154:1: return from a call to CRYPTO_malloc
    152.   
    153.       return ret;
    154. > }
    155.   
    156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/dso/dso_lib.c:345:9: Taking false branch
  343.       /* We'll duplicate filename */
  344.       copied = OPENSSL_malloc(strlen(filename) + 1);
  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: Skipping OPENSSL_strlcpy(): empty list of specs
  347.           return (0);
  348.       }
  349.       OPENSSL_strlcpy(copied, filename, strlen(filename) + 1);
             ^
  350.       OPENSSL_free(dso->filename);
  351.       dso->filename = copied;

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

crypto/mem.c:233:1: start of procedure CRYPTO_free()
    231.   }
    232.   
    233. > void CRYPTO_free(void *str)
    234.   {
    235.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG

crypto/mem.c:244:5: 
    242.       }
    243.   #else
    244. >     free(str);
    245.   #endif
    246.   }

crypto/mem.c:246:1: return from a call to CRYPTO_free
    244.       free(str);
    245.   #endif
    246. > }
    247.   
    248.   void CRYPTO_clear_free(void *str, size_t num)

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

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

crypto/dso/dso_lib.c:353:1: return from a call to DSO_set_filename
  351.       dso->filename = copied;
  352.       return (1);
  353. > }
  354.   
  355.   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;
