提交 98a4e5a3 编写于 作者: O Osier Yang

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
上级 100bba06
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册