|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 1/3] libxl: config parser: do not segfault in some er
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 insertions(+), 0 deletions(-)
diff --git a/tools/libxl/libxlu_cfg.c b/tools/libxl/libxlu_cfg.c
index 864a723..1ade7ea 100644
--- a/tools/libxl/libxlu_cfg.c
+++ b/tools/libxl/libxlu_cfg.c
@@ -93,6 +93,7 @@ int xlu_cfg_readdata(XLU_Config *cfg, const char *data, int
length) {
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]);
--
1.5.6.5
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|