[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <be0dc05173404e6f8bba143a053b3823@BLUPR03MB050.namprd03.prod.outlook.com>
Date: Thu, 13 Dec 2012 15:29:58 +0000
From: KY Srinivasan <kys@...rosoft.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
CC: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"olaf@...fle.de" <olaf@...fle.de>,
"apw@...onical.com" <apw@...onical.com>,
"jasowang@...hat.com" <jasowang@...hat.com>
Subject: RE: [PATCH 1/1] Drivers: hv: balloon: Fix a memory leak
> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@...cle.com]
> Sent: Thursday, December 13, 2012 4:38 AM
> To: KY Srinivasan
> Cc: gregkh@...uxfoundation.org; linux-kernel@...r.kernel.org;
> devel@...uxdriverproject.org; olaf@...fle.de; apw@...onical.com;
> jasowang@...hat.com
> Subject: Re: [PATCH 1/1] Drivers: hv: balloon: Fix a memory leak
>
> On Tue, Dec 11, 2012 at 11:07:17AM -0800, K. Y. Srinivasan wrote:
> > -probe_error1:
> > +probe_error2:
> > kthread_stop(dm_device.thread);
> >
> > -probe_error0:
> > +probe_error1:
> > vmbus_close(dev->channel);
> > +probe_error0:
> > + kfree(send_buffer);
>
> If you used labels that describe what the code does instead of
> GW-BASIC labels then you wouldn't need to rename them.
>
> err_stop_thread:
> kthread_stop(dm_device.thread);
> err_close_vmbus:
> vmbus_close(dev->channel);
> err_free_send_buf:
> kfree(send_buffer);
Thanks Dan. I am not sure how this labeling scheme would work in general where each error
recovery block is a collection of rollback operation. I see your point though.
Regards,
K. Y
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists