fixed double-free bug

This commit is contained in:
Anselm R. Garbe 2006-05-02 00:00:16 +02:00
parent e05860576b
commit 4e824db4b3
1 changed files with 3 additions and 4 deletions

View File

@ -767,12 +767,11 @@ xremove(IXPConn *c, Fcall *fcall)
switch(type) {
case FsDbar:
{
Bar *l = bar.data[i1];
if(l->intern)
Bar *b = bar.data[i1];
if(b->intern)
return Enoperm;
/* now detach the bar */
destroy_bar(l);
free(l);
destroy_bar(b);
draw_bar();
}
break;