Introduction
Introduction Statistics Contact Development Disclaimer Help
tFix memory leak - spoon - dwm status utility (2f30 fork)
git clone git://src.adamsgaard.dk/spoon
Log
Files
Refs
LICENSE
---
commit f99460db09e1eca862b43edf41905d33546ccf79
parent 1c2f9b46506ce4a7dd2f32856b09f89dbe46ad93
Author: sin <[email protected]>
Date: Sun, 15 May 2016 13:34:06 +0100
Fix memory leak
Diffstat:
M spoon.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/spoon.c b/spoon.c
t@@ -100,7 +100,7 @@ xkblayoutread(char *buf, size_t len)
Display *dpy;
XkbStateRec state;
XkbRF_VarDefsRec vd;
- char *tmp, *str, *tok;
+ char *tmp = NULL, *str, *tok;
int i, ret = 0;
dpy = XOpenDisplay(NULL);
t@@ -131,6 +131,7 @@ xkblayoutread(char *buf, size_t len)
out2:
free(str);
out1:
+ free(tmp);
XFree(vd.options);
out0:
XCloseDisplay(dpy);
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.