fix memory leak
This commit is contained in:
parent
a515c92369
commit
7982b261b9
1 changed files with 1 additions and 1 deletions
2
data.c
2
data.c
|
|
@ -195,10 +195,10 @@ iconinit(void)
|
|||
sysfatal("please set your home: %r");
|
||||
buf = smprint("%s/lib/riobg.bit", h);
|
||||
fd = open(buf, OREAD);
|
||||
free(buf);
|
||||
if(fd<0)
|
||||
background = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x777777FF);
|
||||
else{
|
||||
free(buf);
|
||||
background = readimage(display, fd, 0);
|
||||
close(fd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue