Introduction
Introduction Statistics Contact Development Disclaimer Help
tsamterm: free some getenv results - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 75ea8515a5cd26817b4eb5de99eeb6934def9328
parent edfe3c016fe6ef10c55f7a17aab668214ec21efc
Author: Xiao-Yong Jin <[email protected]>
Date: Wed, 21 Mar 2018 22:24:50 -0500
samterm: free some getenv results
Diffstat:
M src/cmd/samterm/plan9.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/cmd/samterm/plan9.c b/src/cmd/samterm/plan9.c
t@@ -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);
}
t@@ -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;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.