aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-14 00:09:03 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-14 00:09:03 +0100
commit094e69641bb6dd01794dc72ca8b4ed3e3df82837 (patch)
tree0513012ae341154d6dce1b433dc27bd30f2c0178 /FICS
parent06d8747fa205dc92ce13bdd8b061c089859c40d6 (diff)
Check malloc() return value
Diffstat (limited to 'FICS')
-rw-r--r--FICS/makerank.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/FICS/makerank.c b/FICS/makerank.c
index 72ee966..3336bca 100644
--- a/FICS/makerank.c
+++ b/FICS/makerank.c
@@ -113,7 +113,10 @@ LoadEntries(void)
int listsize;
listsize = 100;
- list = malloc(sizeof(ENTRY *)*listsize);
+ list = malloc(sizeof(ENTRY *) * listsize);
+
+ if (list == NULL)
+ err(1, "%s: malloc", __func__);
for (letter1 = 'a'; letter1 <= 'z'; letter1++) {
printf("Loading %c's.\n", letter1);