]> git.hungrycats.org Git - linux/commitdiff
fs/autofs/inode.c:parse_options
authorDavid S. Miller <davem@nuts.ninka.net>
Wed, 1 May 2002 14:57:09 +0000 (07:57 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Wed, 1 May 2002 14:57:09 +0000 (07:57 -0700)
- Fix bug in strsep/strchr changes, dereference *this_char
not *value at top of while loop.  This matches how the same
code in fs/autofs4/inode.c looks right now.
Withtout this autofs loading causes an OOPS as the first
time through the loop *value is dereferencing a NULL pointer.

fs/autofs/inode.c

index 4e846d5224503c5164379a0430ad742290990440..16f4348018636eb740118cc9f20e13706cb6ef05 100644 (file)
@@ -61,7 +61,7 @@ static int parse_options(char *options, int *pipefd, uid_t *uid, gid_t *gid, pid
 
        if ( !options ) return 1;
        while ((this_char = strsep(&options,",")) != NULL) {
-               if (!*value)
+               if (!*this_char)
                        continue;
                if ((value = strchr(this_char,'=')) != NULL)
                        *value++ = 0;