utils: remove tal_tmpctx altogether, use global.

In particular, we now only free tmpctx at the end of main().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-03-15 16:40:20 +10:30
parent 40fe5b7bac
commit 0a6e3d1e13
45 changed files with 115 additions and 375 deletions

View File

@@ -281,7 +281,6 @@ static void connection_complete_error(struct json_connection *jcon,
int code,
const struct json_result *data)
{
const tal_t *tmpctx = tal_tmpctx(jcon);
/* Use this to escape errmsg. */
struct json_result *errorres = new_json_result(tmpctx);
const char *data_str;
@@ -305,7 +304,6 @@ static void connection_complete_error(struct json_connection *jcon,
json_result_string(errorres),
data_str,
id)));
tal_free(tmpctx);
}
struct json_result *null_response(const tal_t *ctx)