jamal wrote:
>       for (i = 0; i <= xfrm_state_hmask; i++) {
>               hlist_for_each_entry(x, entry, xfrm_state_bydst+i, bydst) {
> +                     if (count && send_x != last_x) {
> +                             err = func(send_x, count, data);
> +                             if (err)
> +                                     goto out;
> +                             send_x = NULL;
> +                     }
>                       if (!xfrm_id_proto_match(x->id.proto, proto))
>                               continue;

After you sent send_x and set it to NULL, it will be different from
last_x (since that is != NULL) and the NULL pointer will be given
to func() when continuing here.

> -                     err = func(x, --count, data);
> -                     if (err)
> -                             goto out;
> +
> +                     if (!count) {
> +                             last_x = send_x = x;
> +                     } else {
> +                             send_x = last_x;
> +                             last_x = x;
> +                     }
> +                     count++;
>               }
>       }




-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to