Re: [PATCH 1/1] Drivers: hv: balloon: Fix a memory leak

From: Dan Carpenter
Date: Thu Dec 13 2012 - 04:37:47 EST


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);

regards,
dan carpenter

--
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/