diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2011-01-03 17:38:25 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2011-01-03 17:38:25 +0000 |
commit | bdcd8b5fd7a2f3edde9dfd89b48e92f8b15d66aa (patch) | |
tree | 2c4a8ed73d43f27af944ffee46eb9c1aeb06af4c /games/fortune | |
parent | c4c7732f169da2c3d0bd0ff71c1b36a8711e6ff6 (diff) |
- plug mem leak.
ok chl@
Diffstat (limited to 'games/fortune')
-rw-r--r-- | games/fortune/fortune/fortune.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/games/fortune/fortune/fortune.c b/games/fortune/fortune/fortune.c index 7169fb74434..c919142c666 100644 --- a/games/fortune/fortune/fortune.c +++ b/games/fortune/fortune/fortune.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fortune.c,v 1.29 2010/07/02 23:43:42 tedu Exp $ */ +/* $OpenBSD: fortune.c,v 1.30 2011/01/03 17:38:24 jasper Exp $ */ /* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */ /*- @@ -663,8 +663,10 @@ add_dir(FILEDESC *fp) if (fp->num_children == 0) { (void) fprintf(stderr, "fortune: %s: No fortune files in directory.\n", fp->path); + closedir(dir); return FALSE; } + closedir(dir); return TRUE; } |