commit 6555de0502240fc8735e455cacfc720b8e39bd37 from: Stefan Sperling date: Sun Sep 03 13:04:00 2023 UTC tidy up our temporary nshenv file if fdopen() fails (highly unlikely) commit - 0583c4cc97a2206fc4cb5a33bc46d12b934a1c30 commit + 6555de0502240fc8735e455cacfc720b8e39bd37 blob - e1d4d63874e32cdd55d0cd9b33e4d80650fab772 blob + 8ec34c064c7a41b81c920a0d7b65aeb954d098f6 --- commands.c +++ commands.c @@ -2475,8 +2475,10 @@ saveenvcmd(int argc, char **argv) f = fdopen(fd, "w"); if (f == NULL) { - printf("%% fopen %s: %s\n", tmppath, strerror(errno)); + printf("%% fdopen %s: %s\n", tmppath, strerror(errno)); close(fd); + if (unlink(tmppath) == -1) + printf("%% unlink %s: %s\n", tmppath, strerror(errno)); return 0; }