aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/samterm
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2018-04-20 19:39:01 +0200
committerPetter Rodhelind <petter.rodhelind@gmail.com>2018-04-20 19:39:01 +0200
commit79223bb49d950dc6236b6c79c37fea787e40ba5c (patch)
treebb85b2a21fa74e8792704b056cc163c38fcc55c2 /src/cmd/samterm
parentc04683ef3aa6e9f42fb279025f231b06b17191f4 (diff)
parent03a8ec739af17bc4ba0a2e18ea59b33671c34f2b (diff)
downloadplan9port-79223bb49d950dc6236b6c79c37fea787e40ba5c.tar.gz
plan9port-79223bb49d950dc6236b6c79c37fea787e40ba5c.tar.bz2
plan9port-79223bb49d950dc6236b6c79c37fea787e40ba5c.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/cmd/samterm')
-rw-r--r--src/cmd/samterm/plan9.c9
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;