WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: config parser: do not segfault in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: config parser: do not segfault in some error paths
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2011 08:00:03 -0800
Delivery-date: Mon, 17 Jan 2011 08:16:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1294774102 0
# Node ID b80c530dac8ce3d1256ded2e2d9effb879c41d45
# Parent  9ee86e8cfd786aa2c71c8cc9d970712cdefdb161
libxl: config parser: do not segfault in some error paths

In error paths, xlu__cfg_set_free can be called on NULL.
So check for that rather than segfaulting.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxlu_cfg.c |    1 +
 1 files changed, 1 insertion(+)

diff -r 9ee86e8cfd78 -r b80c530dac8c tools/libxl/libxlu_cfg.c
--- a/tools/libxl/libxlu_cfg.c  Tue Jan 11 15:10:21 2011 +0000
+++ b/tools/libxl/libxlu_cfg.c  Tue Jan 11 19:28:22 2011 +0000
@@ -93,6 +93,7 @@ void xlu__cfg_set_free(XLU_ConfigSetting
 void xlu__cfg_set_free(XLU_ConfigSetting *set) {
     int i;
 
+    if (!set) return;
     free(set->name);
     for (i=0; i<set->nvalues; i++)
         free(set->values[i]);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: config parser: do not segfault in some error paths, Xen patchbot-unstable <=