closures.c (open_temp_exec_file_mnt): Check if getmntent_r returns NULL.

* src/closures.c (open_temp_exec_file_mnt): Check if getmntent_r
	returns NULL.

From-SVN: r163809
This commit is contained in:
Mark Wielaard 2010-09-03 10:35:35 +00:00 committed by Mark Wielaard
parent 155c92a7a0
commit 2cd8686617
2 changed files with 6 additions and 1 deletions

View 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*.

View 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")