summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authortg <tg@FreeBSD.org>1999-08-16 13:47:15 +0000
committertg <tg@FreeBSD.org>1999-08-16 13:47:15 +0000
commitcba85e40789f6bce0d40dd391954d13e0253e1ca (patch)
tree6a40913b56997935e317d97581325de40cb7110b /games
parent466108918bc462a51e79ef0b367fc21332852c4f (diff)
downloadFreeBSD-src-cba85e40789f6bce0d40dd391954d13e0253e1ca.zip
FreeBSD-src-cba85e40789f6bce0d40dd391954d13e0253e1ca.tar.gz
Fix core dump with `fortune -f'.
Diffstat (limited to 'games')
-rw-r--r--games/fortune/fortune/fortune.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c
index 854a644..db6bd57 100644
--- a/games/fortune/fortune/fortune.c
+++ b/games/fortune/fortune/fortune.c
@@ -548,11 +548,11 @@ over:
fprintf(stderr,
"fortune:%s not a fortune file or directory\n",
path);
- free((char *) fp);
if (was_malloc)
free(path);
do_free(fp->datfile);
do_free(fp->posfile);
+ free((char *) fp);
do_free(offensive);
return FALSE;
}
OpenPOWER on IntegriCloud