mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
devdraw: call freememimage consistently
Without this, it's possible for a Memimage* from a custom allocmemimage to get passed to libdraw's implementation of freememimage. Signed-off-by: Hank Donnay <hdonnay@gmail.com>
This commit is contained in:
parent
bab7b73b85
commit
c44015fd9a
1 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ gfx_replacescreenimage(Client *c, Memimage *m)
|
|||
c->screenimage = m;
|
||||
m->screenref = 1;
|
||||
if(om && --om->screenref == 0){
|
||||
_freememimage(om);
|
||||
freememimage(om);
|
||||
}
|
||||
qunlock(&drawlk);
|
||||
gfx_mouseresized(c);
|
||||
|
@ -452,7 +452,7 @@ drawfreedimage(Client *client, DImage *dimage)
|
|||
if(l->screenref==0)
|
||||
freememimage(l);
|
||||
else if(--l->screenref==0)
|
||||
_freememimage(l);
|
||||
freememimage(l);
|
||||
}
|
||||
Return:
|
||||
free(dimage->fchar);
|
||||
|
|
Loading…
Reference in a new issue