summaryrefslogtreecommitdiff
path: root/math/atlas/files/patch-tmpnamleak
blob: 6a9c6d7f8081327b27986b22c0a3de81957f3f08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- bin/atlas_install.c.orig	2016-07-28 19:42:59 UTC
+++ bin/atlas_install.c
@@ -1191,6 +1191,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA)
    fprintf(stdout, "ATLAS install complete.  Examine \n");
    fprintf(stdout, "ATLAS/bin/<arch>/INSTALL_LOG/SUMMARY.LOG for details.\n");
    fclose(fpsum);
+   remove(tnam);
    PrintBanner("INSTALL_LOG/SUMMARY.LOG", 0, 0, 0, 0);
 }
 
--- tune/sysinfo/emit_buildinfo.c.orig	2016-07-28 19:43:20 UTC
+++ tune/sysinfo/emit_buildinfo.c
@@ -53,7 +53,10 @@ char *CmndResults(char *cmnd)
    sprintf(ln, "%s > %s\n", cmnd, tnam);
    fprintf(stderr, "system: %s", ln);
    if (!system(ln)) return(tnam);
-   else return(NULL);
+   else {
+      remove(tnam);
+      return(NULL);
+   }
 }
 
 void FixString(char *ln)
@@ -98,6 +101,7 @@ int CmndOneLine(char *cmnd, char *ln)
       assert(fp);
       if (!fgets(ln, 512, fp)) ln[0] = '\0';
       fclose(fp);
+      remove(tnam);
       return(0);
    }
    else ln[0] = '\0';