Merge remote-tracking branch 'public/pr/1161' into mbedtls-1.3

* public/pr/1161:
  Address PR review comments
  Backport 1.3:Fix crash when calling `mbedtls_ssl_cache_free` twice