From: Christos Zoulas Date: Wed, 5 Apr 2006 15:07:39 +0000 (+0000) Subject: Fix use after free. X-Git-Tag: am-utils-6_2a2~13 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=f1fbcd83d2ff0d9433563c3b29251ebee24ae91d;p=am-utils-6.0.git Fix use after free. --- diff --git a/amd/amfs_generic.c b/amd/amfs_generic.c index b1941a6..1651964 100644 --- a/amd/amfs_generic.c +++ b/amd/amfs_generic.c @@ -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