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


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

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

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

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

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

crypto/mem.c:234:1: parameter `str` of CRYPTO_free
      232.   }
      233.   
      234. > void CRYPTO_free(void *str)
      235.   {
      236.   #ifndef OPENSSL_NO_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:608:13: use-after-lifetime part of the trace starts here
606.       for (i = 0; i < num; ++i) {
607.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
608.           if (tlsa_import_rr(con, rrdata) > 0)
                   ^
609.               ++count;
610.       }

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

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

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

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

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

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