|
@@ -2115,7 +2115,7 @@ static void nf_tables_rule_destroy(const struct nft_ctx *ctx,
|
|
* is called on error from nf_tables_newrule().
|
|
* is called on error from nf_tables_newrule().
|
|
*/
|
|
*/
|
|
expr = nft_expr_first(rule);
|
|
expr = nft_expr_first(rule);
|
|
- while (expr->ops && expr != nft_expr_last(rule)) {
|
|
|
|
|
|
+ while (expr != nft_expr_last(rule) && expr->ops) {
|
|
nf_tables_expr_destroy(ctx, expr);
|
|
nf_tables_expr_destroy(ctx, expr);
|
|
expr = nft_expr_next(expr);
|
|
expr = nft_expr_next(expr);
|
|
}
|
|
}
|