diff options
author | ijliao <ijliao@FreeBSD.org> | 2002-10-10 14:40:59 +0800 |
---|---|---|
committer | ijliao <ijliao@FreeBSD.org> | 2002-10-10 14:40:59 +0800 |
commit | 1c140e0d1aba7ae1a765a29f13cab9858360a36b (patch) | |
tree | 5a1f6f9cfb3d9d05f237f9ec496affa6aad3029f /games | |
parent | 19588cc71c6b53fe205c4a345b00339860d6d857 (diff) | |
download | freebsd-ports-gnome-1c140e0d1aba7ae1a765a29f13cab9858360a36b.tar.gz freebsd-ports-gnome-1c140e0d1aba7ae1a765a29f13cab9858360a36b.tar.zst freebsd-ports-gnome-1c140e0d1aba7ae1a765a29f13cab9858360a36b.zip |
Make sure that it doesn't attempt to fclose a NULL pointer if ~/.xpilotrc
is not present.
PR: 38001
Submitted by: Pierre-Paul Lavoie <ppl@nbnet.nb.ca>
Approved by: maintainer timeout
Diffstat (limited to 'games')
-rw-r--r-- | games/editss/files/patch-ab | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/games/editss/files/patch-ab b/games/editss/files/patch-ab index a6b0da4420d6..854005f41b10 100644 --- a/games/editss/files/patch-ab +++ b/games/editss/files/patch-ab @@ -1,5 +1,5 @@ ---- editss.c.orig Sat Sep 7 16:41:38 2002 -+++ editss.c Sat Sep 7 16:42:08 2002 +--- editss.c.orig Wed Mar 22 19:39:59 2000 ++++ editss.c Thu Oct 10 14:39:00 2002 @@ -28,7 +28,6 @@ #include <stdio.h> @@ -8,3 +8,12 @@ #include <string.h> #include <fcntl.h> #include <time.h> +@@ -509,7 +508,7 @@ + while (getoneshipdef(a,fin)) { + nrships+=1; + } +- fclose(fin); ++ if (fin!=NULL) fclose(fin); + if (nrships<1) i1=1; else i1=nrships; + + a[0]='\0'; |