[bugfix] Avoid calling free() with a bad pointer

sp->sec_ctx->ctx is a zero-length member, so it's already allocated