Re: [PATCH] net: scm: moving dereference after NULL check

From: David Miller
Date: Mon Sep 24 2012 - 15:51:44 EST


From: "Maxin B. John" <maxin.john@xxxxxxxxx>
Date: Sun, 23 Sep 2012 13:03:30 -0400

> scm_destroy_cred() dereferences 'scm' before null check
>
> Signed-off-by: Maxin B. John <maxin.john@xxxxxxxxx>

Every caller of scm_destroy() passes a non-NULL scm, so the
NULL test can be removed entirely.

I'll do this in net-next, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/