mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
storage: Fix a problem which will cause libvirtd crashed
If pool xml has no definition for "port", then "Segmentation fault" happens when jumping to "cleanup:" to do "VIR_FREE(port)", as "port" was not initialized in this situation. * src/conf/storage_conf.c
This commit is contained in:
parent
100bba0647
commit
98a4e5a301
@ -396,7 +396,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
|
||||
char *authType = NULL;
|
||||
int nsource, i;
|
||||
virStoragePoolOptionsPtr options;
|
||||
char *port;
|
||||
char *port = NULL;
|
||||
|
||||
relnode = ctxt->node;
|
||||
ctxt->node = node;
|
||||
|
Loading…
Reference in New Issue
Block a user