From e9e9ed30411fc816f91b9f53223d8d5247ed520e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 23 Nov 2019 13:49:22 +0000 Subject: [PATCH] rsa: Move FREE macro up The public key half of this file is going to want this too. Signed-off-by: Ian Jackson --- rsa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rsa.c b/rsa.c index 3ce72b8..5921abd 100644 --- a/rsa.c +++ b/rsa.c @@ -45,6 +45,8 @@ struct rsacommon { uint8_t *hashbuf; }; +#define FREE(b) ({ free((b)); (b)=0; }) + struct load_ctx { void (*verror)(struct load_ctx *l, FILE *maybe_f, bool_t unsup, @@ -372,7 +374,6 @@ static void load_error(struct load_ctx *l, FILE *maybe_f, #define LDUNSUP(...) ({ load_error(l,0,1,__VA_ARGS__); goto error_out; }) #define LDFATAL_FILE(...) ({ load_error(l,f,0,__VA_ARGS__); goto error_out; }) #define LDUNSUP_FILE(...) ({ load_error(l,f,1,__VA_ARGS__); goto error_out; }) -#define FREE(b) ({ free((b)); (b)=0; }) #define KEYFILE_GET(is) ({ \ uint##is##_t keyfile_get_tmp=keyfile_get_##is(l,f); \ if (!l->postreadcheck(l,f)) goto error_out; \ -- 2.30.2