diff options
Diffstat (limited to 'usr.bin/mg/grep.c')
-rw-r--r-- | usr.bin/mg/grep.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/mg/grep.c b/usr.bin/mg/grep.c index a3418dd2cd6..37b4bbd5d32 100644 --- a/usr.bin/mg/grep.c +++ b/usr.bin/mg/grep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grep.c,v 1.6 2002/07/01 14:33:44 vincent Exp $ */ +/* $OpenBSD: grep.c,v 1.7 2002/07/25 16:37:54 vincent Exp $ */ /* * Copyright (c) 2001 Artur Grabowski <art@openbsd.org>. All rights reserved. * @@ -213,6 +213,8 @@ retry: free(line); adjf = adjustname(fname); + if (adjf == NULL) + return (FALSE); if ((bp = findbuffer(adjf)) == NULL) return FALSE; if ((wp = popbuf(bp)) == NULL) |