Re: [libvirt] [PATCH] conf: Prevent crash of libvirtd without channel target name

2012-03-30 Thread Alex Jia
Thanks and pushed now.

- Original Message -
From: "Michal Privoznik" 
To: "Alex Jia" 
Cc: libvir-list@redhat.com
Sent: Friday, March 30, 2012 6:02:21 PM
Subject: Re: [libvirt] [PATCH] conf: Prevent crash of libvirtd without channel 
target name

On 30.03.2012 11:44, Alex Jia wrote:
> * src/conf/domain_conf.c (virDomainChannelDefCheckABIStability): avoid 
> crashing libvirtd due
>   to derefing a NULL pointer.
> 
> For details, please see bug:
> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=808371
> 
> Signed-off-by: Alex Jia 
> ---
>  src/conf/domain_conf.c |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

ACK

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] conf: Prevent crash of libvirtd without channel target name

2012-03-30 Thread Michal Privoznik
On 30.03.2012 11:44, Alex Jia wrote:
> * src/conf/domain_conf.c (virDomainChannelDefCheckABIStability): avoid 
> crashing libvirtd due
>   to derefing a NULL pointer.
> 
> For details, please see bug:
> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=808371
> 
> Signed-off-by: Alex Jia 
> ---
>  src/conf/domain_conf.c |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

ACK

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH] conf: Prevent crash of libvirtd without channel target name

2012-03-30 Thread Alex Jia
* src/conf/domain_conf.c (virDomainChannelDefCheckABIStability): avoid crashing 
libvirtd due
  to derefing a NULL pointer.

For details, please see bug:
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=808371

Signed-off-by: Alex Jia 
---
 src/conf/domain_conf.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 24e10e6..4caef6f 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -9597,10 +9597,10 @@ static bool 
virDomainChannelDefCheckABIStability(virDomainChrDefPtr src,
 
 switch (src->targetType) {
 case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO:
-if (STRNEQ(src->target.name, dst->target.name)) {
+if (STRNEQ_NULLABLE(src->target.name, dst->target.name)) {
 virDomainReportError(VIR_ERR_CONFIG_UNSUPPORTED,
  _("Target channel name %s does not match 
source %s"),
- dst->target.name, src->target.name);
+ NULLSTR(dst->target.name), 
NULLSTR(src->target.name));
 goto cleanup;
 }
 break;
-- 
1.7.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list