Pablo Neira Ayuso <[email protected]> wrote:
> > -   if (ops && ops->destroy)
> > +   if (ops->destroy)
> 
> expr->ops should be always set, so I guess this is fine.
> 
> >             ops->destroy(e);
> >  }
> >  
> > @@ -81,7 +88,8 @@ void expr_free(struct expr *expr)
> >     if (--expr->refcnt > 0)
> >             return;
> >  
> > -   expr_destroy(expr);
> > +   if (expr->etype != EXPR_INVALID)
> > +           expr_destroy(expr);
> 
> Any way to skip this branch?
> 
> This is for compound expressions?

Yes, they have no ops, so NULL deref.  I can add a comment.

Reply via email to