mothra/libpanel: fix memory leak in pledit
parent
748bdc13b2
commit
b20ed3c1f5
|
@ -209,6 +209,12 @@ Point pl_getsizeedit(Panel *p, Point children){
|
||||||
void pl_childspaceedit(Panel *g, Point *ul, Point *size){
|
void pl_childspaceedit(Panel *g, Point *ul, Point *size){
|
||||||
USED(g, ul, size);
|
USED(g, ul, size);
|
||||||
}
|
}
|
||||||
|
void pl_freeedit(Panel *p){
|
||||||
|
Edit *ep;
|
||||||
|
ep=p->data;
|
||||||
|
if(ep->t!=nil) twfree(ep->t);
|
||||||
|
ep->t=0;
|
||||||
|
}
|
||||||
void plinitedit(Panel *v, int flags, Point minsize, Rune *text, int ntext, void (*hit)(Panel *)){
|
void plinitedit(Panel *v, int flags, Point minsize, Rune *text, int ntext, void (*hit)(Panel *)){
|
||||||
Edit *ep;
|
Edit *ep;
|
||||||
ep=v->data;
|
ep=v->data;
|
||||||
|
@ -219,6 +225,7 @@ void plinitedit(Panel *v, int flags, Point minsize, Rune *text, int ntext, void
|
||||||
v->type=pl_typeedit;
|
v->type=pl_typeedit;
|
||||||
v->getsize=pl_getsizeedit;
|
v->getsize=pl_getsizeedit;
|
||||||
v->childspace=pl_childspaceedit;
|
v->childspace=pl_childspaceedit;
|
||||||
|
v->free=pl_freeedit;
|
||||||
v->kind="edit";
|
v->kind="edit";
|
||||||
ep->hit=hit;
|
ep->hit=hit;
|
||||||
ep->minsize=minsize;
|
ep->minsize=minsize;
|
||||||
|
|
Loading…
Reference in New Issue