From 67f465476e7366fcda24327716567381fbae366c Mon Sep 17 00:00:00 2001 From: jnemeth Date: Thu, 30 Mar 2006 04:27:24 +0000 Subject: [PATCH] Coverity CID 993: dereference of NULL pointer --- games/rogue/object.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/games/rogue/object.c b/games/rogue/object.c index 8364e514b4a4..8d9e1a36ecb8 100644 --- a/games/rogue/object.c +++ b/games/rogue/object.c @@ -1,4 +1,4 @@ -/* $NetBSD: object.c,v 1.9 2003/08/07 09:37:39 agc Exp $ */ +/* $NetBSD: object.c,v 1.10 2006/03/30 04:27:24 jnemeth Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)object.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: object.c,v 1.9 2003/08/07 09:37:39 agc Exp $"); +__RCSID("$NetBSD: object.c,v 1.10 2006/03/30 04:27:24 jnemeth Exp $"); #endif #endif /* not lint */ @@ -639,6 +639,7 @@ alloc_object() } else if (!(obj = (object *) md_malloc(sizeof(object)))) { message("cannot allocate object, saving game", 0); save_into_file(error_file); + clean_up("alloc_object: save failed"); } obj->quantity = 1; obj->ichar = 'L';