crypto/conf/conf_mod.c:434: error: USE_AFTER_FREE
  call to `module_finish()` eventually accesses memory that was invalidated by call to `free()` on line 434 indirectly during the call to `module_finish()`.
Showing all 20 steps of the trace


crypto/conf/conf_mod.c:432:32: invalidation part of the trace starts here
430.   {
431.       CONF_IMODULE *imod;
432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
                                      ^
433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
434.           module_finish(imod);

crypto/conf/conf_mod.c:432:32: global variable `initialized_modules` accessed here
  430.   {
  431.       CONF_IMODULE *imod;
  432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
                                        ^
  433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
  434.           module_finish(imod);

crypto/conf/conf_mod.c:433:16: passed as argument to `sk_CONF_IMODULE_pop`
  431.       CONF_IMODULE *imod;
  432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
  433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
                        ^
  434.           module_finish(imod);
  435.       }

crypto/conf/conf_mod.c:433:16: return from call to `sk_CONF_IMODULE_pop`
  431.       CONF_IMODULE *imod;
  432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
  433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
                        ^
  434.           module_finish(imod);
  435.       }

crypto/conf/conf_mod.c:433:9: assigned
  431.       CONF_IMODULE *imod;
  432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
  433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
                 ^
  434.           module_finish(imod);
  435.       }

crypto/conf/conf_mod.c:434:9: when calling `module_finish` here
  432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
  433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
  434.           module_finish(imod);
                 ^
  435.       }
  436.       sk_CONF_IMODULE_free(initialized_modules);

crypto/conf/conf_mod.c:442:1: parameter `imod` of module_finish
    440.   /* finish a module instance */
    441.   
    442. > static void module_finish(CONF_IMODULE *imod)
    443.   {
    444.       if (!imod)

crypto/conf/conf_mod.c:451:5: when calling `CRYPTO_free` here
    449.       OPENSSL_free(imod->name);
    450.       OPENSSL_free(imod->value);
    451.       OPENSSL_free(imod);
               ^
    452.   }
    453.   

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

crypto/mem.c:244:5: was invalidated by call to `free()`
      242.       }
      243.   #else
      244.       free(str);
                 ^
      245.   #endif
      246.   }

crypto/conf/conf_mod.c:432:32: use-after-lifetime part of the trace starts here
430.   {
431.       CONF_IMODULE *imod;
432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
                                      ^
433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
434.           module_finish(imod);

crypto/conf/conf_mod.c:432:32: global variable `initialized_modules` accessed here
  430.   {
  431.       CONF_IMODULE *imod;
  432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
                                        ^
  433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
  434.           module_finish(imod);

crypto/conf/conf_mod.c:433:16: passed as argument to `sk_CONF_IMODULE_pop`
  431.       CONF_IMODULE *imod;
  432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
  433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
                        ^
  434.           module_finish(imod);
  435.       }

crypto/conf/conf_mod.c:433:16: return from call to `sk_CONF_IMODULE_pop`
  431.       CONF_IMODULE *imod;
  432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
  433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
                        ^
  434.           module_finish(imod);
  435.       }

crypto/conf/conf_mod.c:433:9: assigned
  431.       CONF_IMODULE *imod;
  432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
  433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
                 ^
  434.           module_finish(imod);
  435.       }

crypto/conf/conf_mod.c:434:9: when calling `module_finish` here
  432.       while (sk_CONF_IMODULE_num(initialized_modules) > 0) {
  433.           imod = sk_CONF_IMODULE_pop(initialized_modules);
  434.           module_finish(imod);
                 ^
  435.       }
  436.       sk_CONF_IMODULE_free(initialized_modules);

crypto/conf/conf_mod.c:442:1: parameter `imod` of module_finish
    440.   /* finish a module instance */
    441.   
    442. > static void module_finish(CONF_IMODULE *imod)
    443.   {
    444.       if (!imod)

crypto/conf/conf_mod.c:451:5: when calling `CRYPTO_free` here
    449.       OPENSSL_free(imod->name);
    450.       OPENSSL_free(imod->value);
    451.       OPENSSL_free(imod);
               ^
    452.   }
    453.   

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

crypto/mem.c:244:5: invalid access occurs here
      242.       }
      243.   #else
      244.       free(str);
                 ^
      245.   #endif
      246.   }
