From 3380c56176a050cdf13b7a4b2ee8b0ba8c63b62b Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 16 Aug 2022 22:51:32 +0100 Subject: Fix malloc return check in mkentprops Spotted by Bill the other day. --- src/build/mkentprops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/build/mkentprops.c') diff --git a/src/build/mkentprops.c b/src/build/mkentprops.c index 9c366e5..300dafa 100644 --- a/src/build/mkentprops.c +++ b/src/build/mkentprops.c @@ -84,7 +84,7 @@ static void kv_cb(enum kv_token type, const char *p, uint len, void *ctxt) { case KV_NEST_END: badparse(state, "unexpected closing brace"); case KV_VAL: case KV_VAL_QUOTED:; struct prop *prop = malloc(sizeof(*prop)); - if (!p) die("couldn't allocate memory"); + if (!prop) die("couldn't allocate memory"); prop->varname = state->lastvar; char *classname = malloc(len + 1); if (!classname) die("couldn't allocate memory"); -- cgit v1.2.3