Messages in this thread | | | Date | Sun, 29 Sep 2002 17:11:04 +0100 | From | Matthew Wilcox <> | Subject | Re: [patch] Serial 2/2 |
| |
> @@ -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/
| |