From 395efb9c8a0a0160a7b95769e9484bae5548bbde Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 17 Aug 2024 20:47:33 +0300 Subject: add analyzer and fix some reported issues --- src/res.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/res.c') diff --git a/src/res.c b/src/res.c index 12d25ce..1d2b25b 100644 --- a/src/res.c +++ b/src/res.c @@ -26,6 +26,9 @@ static void res_expand(struct res *r) struct res *res_create() { struct res *r = malloc(sizeof(struct res)); + if (!r) + return NULL; + r->n = 0; /* arbitrary number */ r->max = 1024; -- cgit v1.3