]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
closures.c (open_temp_exec_file_mnt): Check if getmntent_r returns NULL.
authorMark Wielaard <mjw@redhat.com>
Fri, 3 Sep 2010 10:35:35 +0000 (10:35 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Fri, 3 Sep 2010 10:35:35 +0000 (10:35 +0000)
* src/closures.c (open_temp_exec_file_mnt): Check if getmntent_r
returns NULL.

From-SVN: r163809

libffi/ChangeLog
libffi/src/closures.c

index c1ef68dd0c6b04f46d8a5ab88037e7dce1f606a1..4ebcb84acbaf3e8e242a4bd3342727c9f2a681a7 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-20  Mark Wielaard  <mjw@redhat.com>
+
+       * src/closures.c (open_temp_exec_file_mnt): Check if getmntent_r
+       returns NULL.
+
 2010-08-09  Andreas Tobler  <andreast@fgznet.ch>
 
        * configure.ac: Add target powerpc64-*-freebsd*.
index 8f295dddc3c286cae949274aa08c9d55bfa44972..d7b338b5f5ef9a43c0e7a3a374f43a2f77b5f9d0 100644 (file)
@@ -294,7 +294,7 @@ open_temp_exec_file_mnt (const char *mounts)
       struct mntent mnt;
       char buf[MAXPATHLEN * 3];
 
-      if (getmntent_r (last_mntent, &mnt, buf, sizeof (buf)))
+      if (getmntent_r (last_mntent, &mnt, buf, sizeof (buf)) == NULL)
        return -1;
 
       if (hasmntopt (&mnt, "ro")