[PATCH] i2400m/USB: fix kfree(skb)
Inaky Perez-Gonzalez
inaky at linux.intel.com
Mon Jan 19 11:42:51 MST 2009
On Saturday 17 January 2009, Roel Kluin wrote:
> Fix kfree(skb)
>
> Signed-off-by: Roel Kluin <roel.kluin at gmail.com>
> ---
> FYI:
> I noted that in the latter patch, function i2400mu_rx() rx_skb is freed,
> but at label :out still rx_skb is returned
Huh, good catch -- that's embarrassing.
> But this doesn't matter since the return value of this function, only
> called at lines 342 and 404, is checked with:
>
> ret = i2400mu_rx(...);
> if (IS_ERR(ret))
> return PTR_ERR(ret);
Well, as the 'out:' path returns rx_skb, in that error path it should
be set to NULL and i2400mu_rxd() should check for that and treat is as
a retryable condition (I don't think it makes much sense to quit because
of that).
I'll rework your patch to add that.
Thank you!
--
Inaky
More information about the wimax
mailing list