summaryrefslogtreecommitdiffhomepage
path: root/src/build
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-08-16 22:51:32 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-08-16 22:52:47 +0100
commit3380c56176a050cdf13b7a4b2ee8b0ba8c63b62b (patch)
treea1bb244db31794dd3caf9f84418c195f49681579 /src/build
parent5e921bf59373d79d27c322ff86e8b5a37b151e45 (diff)
Fix malloc return check in mkentprops
Spotted by Bill the other day.
Diffstat (limited to 'src/build')
-rw-r--r--src/build/mkentprops.c2
1 files changed, 1 insertions, 1 deletions
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");