summaryrefslogtreecommitdiff
path: root/zwgc/xshow.c
diff options
context:
space:
mode:
authorGravatar Lucien Van Elsen <lwvanels@mit.edu>1992-08-26 00:22:34 +0000
committerGravatar Lucien Van Elsen <lwvanels@mit.edu>1992-08-26 00:22:34 +0000
commite368f66b82cc733d28da8e0e20a208d2d27406e5 (patch)
treea62028b4da3dacbf1236e50fc776bbec2682bf15 /zwgc/xshow.c
parent15f18c143f0378075d9aac7947b23a7b52b4559c (diff)
(xshow) style string could be leaked.
Diffstat (limited to 'zwgc/xshow.c')
-rw-r--r--zwgc/xshow.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/zwgc/xshow.c b/zwgc/xshow.c
index f811f46..402368d 100644
--- a/zwgc/xshow.c
+++ b/zwgc/xshow.c
@@ -366,6 +366,7 @@ void xshow(dpy, desc, numstr, numnl)
int nextblock=0;
int line=0,linestart=0;
char *style;
+ int free_style = 0;
int beepcount = 0;
lines = (xlinedesc *)malloc(sizeof(xlinedesc)*(numnl+1));
@@ -388,6 +389,7 @@ void xshow(dpy, desc, numstr, numnl)
style = string_Concat2(style,".");
style = string_Concat2(style,no_dots_downcase_var("sender"));
string_Downcase(style);
+ free_style = 1;
}
for (; desc->code!=DT_EOF; desc=desc->next) {
@@ -526,6 +528,8 @@ void xshow(dpy, desc, numstr, numnl)
beepcount);
free(lines);
free(auxblocks);
+ if (free_style)
+ free(style);
}
static void xhandleevent(dpy, w, event)