Fix memory leaks when using PolarSSL. Valgrind says it's 100% leak free now :)