> @@ -1582,10 +1583,10 @@
> ret = -ENOMEM;
> }
>
> - if (ret) {
> - if (res_rsa)
> + if (ret == 0) {
> + if (res_rsa == 0)
> release_resource(res_rsa);
> - if (res)
> + if (res == 0)
> release_resource(res);
> }
> return ret;
definitely not.
if (res_rsa)
release_resource(res_rsa);
will release the resource if we allocated it. your patch calls
release_resource with an argument of NULL, and we'll leak the resource
we allocated.
i'm not sure about the rest of your changes, but this one is definitely
wrong.
-- Revolutions do not require corporate support. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Sep 30 2002 - 22:00:40 EST