Fix use after free.
authorChristos Zoulas <christos@zoulas.com>
Wed, 5 Apr 2006 15:07:39 +0000 (15:07 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 5 Apr 2006 15:07:39 +0000 (15:07 +0000)
amd/amfs_generic.c

index b1941a68cdc894b058ae5ceb473db0506ff41bd4..16519645a48613e3a88207a2d54f4e79fa4eda2e 100644 (file)
@@ -414,8 +414,9 @@ amfs_lookup_mntfs(am_node *new_mp, int *error_return)
       /*
        * Pick up new defaults
        */
+      char *new_def_opts = str3cat(NULL, def_opts, ";", *cur_ivec + 1);
       XFREE(def_opts);
-      def_opts = str3cat((char *) NULL, def_opts, ";", *cur_ivec + 1);
+      def_opts = new_def_opts;
       dlog("Setting def_opts to \"%s\"", def_opts);
       continue;
     } else