altcp_tls_alloc: need to close inner conn instead of freeing it

This commit is contained in:
goldsimon 2018-02-20 17:08:00 +01:00
parent 3bd87e3815
commit bcff67b00e

View File

@ -70,7 +70,7 @@ altcp_tls_alloc(void *arg, u8_t ip_type)
}
ret = altcp_tls_new(config, inner_conn);
if (ret == NULL) {
altcp_free(inner_conn);
altcp_close(inner_conn);
}
return ret;
}