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


apps/s_client.c:627:13: invalidation part of the trace starts here
625.       for (i = 0; i < num; ++i) {
626.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
627.           if (tlsa_import_rr(con, rrdata) > 0)
                   ^
628.               ++count;
629.       }

apps/s_client.c:627:13: global variable `tlsa_import_rr.data` accessed here
  625.       for (i = 0; i < num; ++i) {
  626.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
  627.           if (tlsa_import_rr(con, rrdata) > 0)
                     ^
  628.               ++count;
  629.       }

apps/s_client.c:627:13: when calling `tlsa_import_rr` here
  625.       for (i = 0; i < num; ++i) {
  626.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
  627.           if (tlsa_import_rr(con, rrdata) > 0)
                     ^
  628.               ++count;
  629.       }

apps/s_client.c:584:9: global variable `tlsa_import_rr.data` accessed here
    582.           { &selector, "selector", checked_uint8 },
    583.           { &mtype, "mtype", checked_uint8 },
    584.           { &data, "data", hexdecode },
                   ^
    585.           { NULL, }
    586.       };

apps/s_client.c:602:5: when calling `CRYPTO_free` here
    600.       /* The data field is last, so len is its length */
    601.       ret = SSL_dane_tlsa_add(con, usage, selector, mtype, data, len);
    602.       OPENSSL_free(data);
               ^
    603.   
    604.       if (ret == 0) {

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.   }

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

apps/s_client.c:627:13: global variable `tlsa_import_rr.data` accessed here
  625.       for (i = 0; i < num; ++i) {
  626.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
  627.           if (tlsa_import_rr(con, rrdata) > 0)
                     ^
  628.               ++count;
  629.       }

apps/s_client.c:627:13: when calling `tlsa_import_rr` here
  625.       for (i = 0; i < num; ++i) {
  626.           char *rrdata = sk_OPENSSL_STRING_value(rrset, i);
  627.           if (tlsa_import_rr(con, rrdata) > 0)
                     ^
  628.               ++count;
  629.       }

apps/s_client.c:584:9: global variable `tlsa_import_rr.data` accessed here
    582.           { &selector, "selector", checked_uint8 },
    583.           { &mtype, "mtype", checked_uint8 },
    584.           { &data, "data", hexdecode },
                   ^
    585.           { NULL, }
    586.       };

apps/s_client.c:602:5: when calling `CRYPTO_free` here
    600.       /* The data field is last, so len is its length */
    601.       ret = SSL_dane_tlsa_add(con, usage, selector, mtype, data, len);
    602.       OPENSSL_free(data);
               ^
    603.   
    604.       if (ret == 0) {

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.   }
