OSDN Git Service

Merge git://git.infradead.org/mtd-2.6
[linux-kernel-docs/linux-2.6.git] / fs / affs / super.c
index d2dc047..01d25d5 100644 (file)
@@ -199,7 +199,6 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s
                case Opt_prefix:
                        /* Free any previous prefix */
                        kfree(*prefix);
-                       *prefix = NULL;
                        *prefix = match_strdup(&args[0]);
                        if (!*prefix)
                                return 0;
@@ -233,6 +232,8 @@ parse_options(char *options, uid_t *uid, gid_t *gid, int *mode, int *reserved, s
                        break;
                case Opt_volume: {
                        char *vol = match_strdup(&args[0]);
+                       if (!vol)
+                               return 0;
                        strlcpy(volume, vol, 32);
                        kfree(vol);
                        break;