diff options
author | jsm <jsm@NetBSD.org> | 1999-09-09 17:27:58 +0000 |
---|---|---|
committer | jsm <jsm@NetBSD.org> | 1999-09-09 17:27:58 +0000 |
commit | 05028c2aa439ddb8c5624303ab13b755c79e3930 (patch) | |
tree | 4dbfd0bd9517b044c230067c63c13f98608d7599 /monop/prop.c | |
parent | 73294a12acd4e9ce3be5c49adc331ab62d3a398f (diff) | |
download | bsdgames-darwin-05028c2aa439ddb8c5624303ab13b755c79e3930.tar.gz bsdgames-darwin-05028c2aa439ddb8c5624303ab13b755c79e3930.tar.zst bsdgames-darwin-05028c2aa439ddb8c5624303ab13b755c79e3930.zip |
Check for failure of malloc() and calloc() at various places in the games.
Diffstat (limited to 'monop/prop.c')
-rw-r--r-- | monop/prop.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/monop/prop.c b/monop/prop.c index aec1f76a..5c4d27e1 100644 --- a/monop/prop.c +++ b/monop/prop.c @@ -1,4 +1,4 @@ -/* $NetBSD: prop.c,v 1.5 1999/08/21 10:40:04 simonb Exp $ */ +/* $NetBSD: prop.c,v 1.6 1999/09/09 17:27:59 jsm Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)prop.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: prop.c,v 1.5 1999/08/21 10:40:04 simonb Exp $"); +__RCSID("$NetBSD: prop.c,v 1.6 1999/09/09 17:27:59 jsm Exp $"); #endif #endif /* not lint */ @@ -75,6 +75,8 @@ add_list(plr, head, op_sqr) OWN *op; op = (OWN *)calloc(1, sizeof (OWN)); + if (op == NULL) + errx(1, "out of memory"); op->sqr = &board[op_sqr]; val = value(op->sqr); last_tp = NULL; |