From c36e6ebf618a0458499829024f8695f5c9fdb56c Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 13 May 2006 22:43:02 +0000 Subject: Coverity CID 3383: Fix memory leak. --- hack/hack.worm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hack/hack.worm.c') diff --git a/hack/hack.worm.c b/hack/hack.worm.c index 349c1c7f..8da7e78b 100644 --- a/hack/hack.worm.c +++ b/hack/hack.worm.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.worm.c,v 1.5 2003/04/02 18:36:41 jsm Exp $ */ +/* $NetBSD: hack.worm.c,v 1.6 2006/05/13 22:43:02 christos Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hack.worm.c,v 1.5 2003/04/02 18:36:41 jsm Exp $"); +__RCSID("$NetBSD: hack.worm.c,v 1.6 2006/05/13 22:43:02 christos Exp $"); #endif /* not lint */ #include @@ -269,6 +269,7 @@ cutworm(mtmp, x, y, weptyp) } else { pline("You cut off part of the worm's tail."); remseg(wtmp); + monfree(mtmp2); } mtmp->mhp /= 2; return; -- cgit v1.2.3