mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
network_conf: Don't free uninitialized pointers while parsing DNS SRV
If the user specified invalid protocol type in a network's SRV record the error path ended up in freeing uninitialized pointers causing a daemon crash. *network_conf.c: virNetworkDNSSrvDefParseXML(): initialize local variables
This commit is contained in:
parent
6117c35829
commit
96ebb4fe58
@ -574,10 +574,10 @@ virNetworkDNSSrvDefParseXML(virNetworkDNSDefPtr def,
|
||||
xmlNodePtr cur,
|
||||
xmlXPathContextPtr ctxt)
|
||||
{
|
||||
char *domain;
|
||||
char *service;
|
||||
char *protocol;
|
||||
char *target;
|
||||
char *domain = NULL;
|
||||
char *service = NULL;
|
||||
char *protocol = NULL;
|
||||
char *target = NULL;
|
||||
int port;
|
||||
int priority;
|
||||
int weight;
|
||||
|
Loading…
Reference in New Issue
Block a user