Handle constant object string from mntent correctly.
authordrepper <drepper>
Mon, 8 Jun 1998 21:46:42 +0000 (21:46 +0000)
committerdrepper <drepper>
Mon, 8 Jun 1998 21:46:42 +0000 (21:46 +0000)
sysdeps/unix/sysv/linux/fstatvfs.c

index ef28bc6..2a7714f 100644 (file)
@@ -137,7 +137,7 @@ fstatvfs (int fd, struct statvfs *buf)
                {
                  /* Bingo, we found the entry for the device FD is on.
                     Now interpret the option string.  */
-                 char *cp = mntbuf.mnt_opts;
+                 char *cp = strdupa (mntbuf.mnt_opts);
                  char *opt;
 
                  while ((opt = strsep (&cp, ",")) != NULL)