[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] [PATCH] Avoid segfault upon early libvirtd failure.



On Mon, Mar 03, 2008 at 05:10:28PM +0100, Jim Meyering wrote:
> Signed-off-by: Jim Meyering <meyering redhat com>
> ---
>  qemud/qemud.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/qemud/qemud.c b/qemud/qemud.c
> index 96fdf32..b6b82ed 100644
> --- a/qemud/qemud.c
> +++ b/qemud/qemud.c
> @@ -2025,7 +2025,7 @@ libvirt management daemon:\n\
> 
>  #define MAX_LISTEN 5
>  int main(int argc, char **argv) {
> -    struct qemud_server *server;
> +    struct qemud_server *server = NULL;
>      struct sigaction sig_action;
>      int sigpipe[2];
>      const char *pid_file = NULL;
> @@ -2180,7 +2180,8 @@ int main(int argc, char **argv) {
>          unlink (pid_file);
> 
>   error1:
> -    qemudCleanup(server);
> +    if (server)
> +        qemudCleanup(server);
>      return ret;
>  }
> 
> --
> 1.5.4.3.366.g55277

+1.

And +1 to the other patches you posted today too.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]