devdraw: fix some memory leaks in x11
This commit is contained in:
parent
7ca1c90109
commit
b2f6769830
2 changed files with 5 additions and 1 deletions
|
|
@ -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)){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue