apps/s_client.c:609: error: USE_AFTER_FREE
  call to `tlsa_import_rr()` eventually accesses memory that was invalidated by call to `free()` on line 609 indirectly during the call to `tlsa_import_rr()`.
Showing all 14 steps of the trace


apps/s_client.c:609:13: invalidation part of the trace starts here
607.       for (i = 0; i < num; ++i) {
608.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
609.           if (tlsa_import_rr(con, rrdata) > 0)
                   ^
610.               ++count;
611.       }

apps/s_client.c:609:13: global variable `tlsa_import_rr.data` accessed here
  607.       for (i = 0; i < num; ++i) {
  608.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
  609.           if (tlsa_import_rr(con, rrdata) > 0)
                     ^
  610.               ++count;
  611.       }

apps/s_client.c:609:13: when calling `tlsa_import_rr` here
  607.       for (i = 0; i < num; ++i) {
  608.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
  609.           if (tlsa_import_rr(con, rrdata) > 0)
                     ^
  610.               ++count;
  611.       }

apps/s_client.c:566:9: global variable `tlsa_import_rr.data` accessed here
    564.           { &selector, "selector", checked_uint8 },
    565.           { &mtype, "mtype", checked_uint8 },
    566.           { &data, "data", hexdecode },
                   ^
    567.           { NULL, }
    568.       };

apps/s_client.c:584:5: when calling `CRYPTO_free` here
    582.       /* The data field is last, so len is its length */
    583.       ret = SSL_dane_tlsa_add(con, usage, selector, mtype, data, len);
    584.       OPENSSL_free(data);
               ^
    585.   
    586.       if (ret == 0) {

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

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

apps/s_client.c:609:13: use-after-lifetime part of the trace starts here
607.       for (i = 0; i < num; ++i) {
608.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
609.           if (tlsa_import_rr(con, rrdata) > 0)
                   ^
610.               ++count;
611.       }

apps/s_client.c:609:13: global variable `tlsa_import_rr.data` accessed here
  607.       for (i = 0; i < num; ++i) {
  608.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
  609.           if (tlsa_import_rr(con, rrdata) > 0)
                     ^
  610.               ++count;
  611.       }

apps/s_client.c:609:13: when calling `tlsa_import_rr` here
  607.       for (i = 0; i < num; ++i) {
  608.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
  609.           if (tlsa_import_rr(con, rrdata) > 0)
                     ^
  610.               ++count;
  611.       }

apps/s_client.c:566:9: global variable `tlsa_import_rr.data` accessed here
    564.           { &selector, "selector", checked_uint8 },
    565.           { &mtype, "mtype", checked_uint8 },
    566.           { &data, "data", hexdecode },
                   ^
    567.           { NULL, }
    568.       };

apps/s_client.c:584:5: when calling `CRYPTO_free` here
    582.       /* The data field is last, so len is its length */
    583.       ret = SSL_dane_tlsa_add(con, usage, selector, mtype, data, len);
    584.       OPENSSL_free(data);
               ^
    585.   
    586.       if (ret == 0) {

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

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