From: Ian Jackson Date: Sat, 23 Nov 2019 13:49:22 +0000 (+0000) Subject: rsa: Move FREE macro up X-Git-Tag: v0.6.0~165 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=commitdiff_plain;h=e9e9ed30411fc816f91b9f53223d8d5247ed520e rsa: Move FREE macro up The public key half of this file is going to want this too. Signed-off-by: Ian Jackson --- 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; \