diff options
author | Xiao-Yong Jin <xjin@anl.gov> | 2018-03-21 22:24:50 -0500 |
---|---|---|
committer | David du Colombier <0intro@gmail.com> | 2018-03-27 15:03:12 +0200 |
commit | 75ea8515a5cd26817b4eb5de99eeb6934def9328 (patch) | |
tree | b2de406698f0b08e611c1dc39f29559a27aa5ca0 /src/cmd/samterm | |
parent | edfe3c016fe6ef10c55f7a17aab668214ec21efc (diff) | |
download | plan9port-75ea8515a5cd26817b4eb5de99eeb6934def9328.tar.gz plan9port-75ea8515a5cd26817b4eb5de99eeb6934def9328.tar.bz2 plan9port-75ea8515a5cd26817b4eb5de99eeb6934def9328.zip |
samterm: free some getenv results
Diffstat (limited to 'src/cmd/samterm')
-rw-r--r-- | src/cmd/samterm/plan9.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cmd/samterm/plan9.c b/src/cmd/samterm/plan9.c index 469d566e..1b933578 100644 --- a/src/cmd/samterm/plan9.c +++ b/src/cmd/samterm/plan9.c @@ -53,8 +53,10 @@ getscreen(int argc, char **argv) threadexitsall("init"); } t = getenv("tabstop"); - if(t != nil) + if(t != nil){ maxtab = strtoul(t, nil, 0); + free(t); + } draw(screen, screen->clipr, display->white, nil, ZP); } @@ -149,10 +151,13 @@ extstart(void) if(user == nil) return; disp = getenv("DISPLAY"); - if(disp) + if(disp){ exname = smprint("/tmp/.sam.%s.%s", user, disp); + free(disp); + } else exname = smprint("/tmp/.sam.%s", user); + free(user); if(exname == nil){ fprint(2, "not posting for B: out of memory\n"); return; |