diff --git a/tools/kconfig/confdata.c b/tools/kconfig/confdata.c index dd243d2ab..1e3d1f35b 100644 --- a/tools/kconfig/confdata.c +++ b/tools/kconfig/confdata.c @@ -771,7 +771,7 @@ int conf_write(const char *name) sprintf(newname, "%s%s", dirname, basename); env = getenv("KCONFIG_OVERWRITECONFIG"); if (!env || !*env) { - sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()); + sprintf(tmpname, "%s.tmpconfig.%d", newname, (int)getpid()); out = fopen(tmpname, "w"); } else { *tmpname = 0;