Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / misc / less / patches / patch-ac
blobc7b0f87f3065a4ae20f6bca5bad2761b66d05173
1 $NetBSD: patch-ac,v 1.1 2007/04/25 18:10:17 tnn Exp $
3 Fix resource leak found by Coverity scan of the NetBSD sources.
5 --- edit.c.orig 2005-12-03 21:20:32.000000000 +0100
6 +++ edit.c
7 @@ -711,7 +711,8 @@ use_logfile(filename)
8          */
9         filename = shell_unquote(filename);
10         exists = open(filename, OPEN_READ);
11 -       close(exists);
12 +       if (exists >= 0)
13 +               close(exists);
14         exists = (exists >= 0);
16         /*