[libvirt] [PATCH] lxc: do cleanup when failed to create new string
Martin Kletzander
mkletzan at redhat.com
Tue Jan 14 13:24:09 UTC 2014
On Tue, Jan 14, 2014 at 05:31:03PM +0800, Chen Hanxiao wrote:
> From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
>
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> ---
> src/lxc/lxc_process.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
> index c51c4d5..fc399fb 100644
> --- a/src/lxc/lxc_process.c
> +++ b/src/lxc/lxc_process.c
> @@ -1045,7 +1045,7 @@ int virLXCProcessStart(virConnectPtr conn,
>
> if (virAsprintf(&logfile, "%s/%s.log",
> cfg->logDir, vm->def->name) < 0)
> - return -1;
> + goto cleanup;
>
I see nothing in that cleanup that needs to be done in this codepath.
The only thing which might be needed is cleaning up the
vm->def->resource, but that doesn't make much sense to me. Can you
explain the change?
Plus the indentation's off.
Thanks,
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140114/29668916/attachment-0001.sig>
More information about the libvir-list
mailing list