All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@suse.com>
To: Marek Marczykowski <marmarek@invisiblethingslab.com>
Cc: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Subject: Re: [PATCH] libxl: do not call exit() in	libxl_device_vtpm_list
Date: Tue, 07 May 2013 23:28:35 -0600	[thread overview]
Message-ID: <5189E283.1010302@suse.com> (raw)
In-Reply-To: <20130508042441.5815127B@duch.mimuw.edu.pl>

Marek Marczykowski wrote:
> Signal error with NULL return value, do not terminate the whole process.
>
> Signed-off-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
> ---
>  tools/libxl/libxl.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 03fd35a..5b9a3df 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -1860,11 +1860,12 @@ libxl_device_vtpm *libxl_device_vtpm_list(libxl_ctx *ctx, uint32_t domid, int *n
>            vtpm->backend_domid = atoi(tmp);
>  
>            tmp = libxl__xs_read(gc, XBT_NULL, GCSPRINTF("%s/uuid", be_path));
> -          if(tmp) {
> -             if(libxl_uuid_from_string(&(vtpm->uuid), tmp)) {
> -                LOG(ERROR, "%s/uuid is a malformed uuid?? (%s) Probably a bug!!\n", be_path, tmp);
> -                exit(1);
> -             }
>   

Ouch.  libxl shouldn't be calling exit :).

> +          if (tmp) {
> +              if(libxl_uuid_from_string(&(vtpm->uuid), tmp)) {
> +                  LOG(ERROR, "%s/uuid is a malformed uuid?? (%s) Probably a bug!!\n", be_path, tmp);
> +                  free(vtpms);
> +                  return NULL;
> +              }
>            }
>         }
>      }
>   

    Reviewed-by: Jim Fehlig <jfehlig@suse.com>

Regards,
Jim

  reply	other threads:[~2013-05-08  5:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08  3:47 [PATCH] libxl: do not call exit() in libxl_device_vtpm_list Marek Marczykowski
2013-05-08  5:28 ` Jim Fehlig [this message]
2013-05-08  9:35 ` Ian Campbell
2013-07-04 10:41   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5189E283.1010302@suse.com \
    --to=jfehlig@suse.com \
    --cc=ian.campbell@citrix.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.