aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd/devdraw/x11-init.c2
-rw-r--r--src/cmd/devdraw/x11-itrans.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/devdraw/x11-init.c b/src/cmd/devdraw/x11-init.c
index 04b13a03..5363fb74 100644
--- a/src/cmd/devdraw/x11-init.c
+++ b/src/cmd/devdraw/x11-init.c
@@ -176,6 +176,7 @@ _xattach(char *label, char *winsize)
}
}
}
+ XFree(pfmt);
if(_x.chan == 0){
werrstr("could not determine screen pixel format");
goto err0;
@@ -232,6 +233,7 @@ _xattach(char *label, char *winsize)
geom = smprint("%s.geometry", label);
if(geom && XrmGetResource(database, geom, nil, &geomrestype, &geomres))
mask = XParseGeometry(geomres.addr, &x, &y, (uint*)&width, (uint*)&height);
+ XrmDestroyDatabase(database);
free(geom);
if((mask & WidthValue) && (mask & HeightValue)){
diff --git a/src/cmd/devdraw/x11-itrans.c b/src/cmd/devdraw/x11-itrans.c
index d84cdc8f..729f2647 100644
--- a/src/cmd/devdraw/x11-itrans.c
+++ b/src/cmd/devdraw/x11-itrans.c
@@ -431,8 +431,10 @@ _xgetsnarffrom(XWindow w, Atom clipboard, Atom target, int timeout0, int timeout
usleep(10*1000);
XGetWindowProperty(_x.display, _x.drawable, prop, 0, 0, 0, AnyPropertyType,
&type, &fmt, &dummy, &len, &xdata);
- if(lastlen == len && len > 0)
+ if(lastlen == len && len > 0){
+ XFree(xdata);
break;
+ }
lastlen = len;
XFree(xdata);
}