From cfded02a05f7fd5314ca4619b53005955a60acee Mon Sep 17 00:00:00 2001 From: "hp.com!davidm" Date: Sat, 29 Mar 2003 07:32:50 +0000 Subject: [PATCH] (maps_close): Do nothing if mi->fp is already NULL. (Logical change 1.71) --- src/os-linux.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/os-linux.h b/src/os-linux.h index 88ba4ac2..9b8c3e15 100644 --- a/src/os-linux.h +++ b/src/os-linux.h @@ -62,6 +62,8 @@ maps_next (struct map_iterator *mi, static inline void maps_close (struct map_iterator *mi) { + if (!mi->fp) + return; fclose (mi->fp); mi->fp = NULL; }