mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 12:05:17 +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 (cherry picked from commit 96ebb4fe586512487f83b4696d20923315889796)
This commit is contained in:
parent
aa57eae7b1
commit
568e6651ba
@ -574,10 +574,10 @@ virNetworkDNSSrvDefParseXML(virNetworkDNSDefPtr def,
|
|||||||
xmlNodePtr cur,
|
xmlNodePtr cur,
|
||||||
xmlXPathContextPtr ctxt)
|
xmlXPathContextPtr ctxt)
|
||||||
{
|
{
|
||||||
char *domain;
|
char *domain = NULL;
|
||||||
char *service;
|
char *service = NULL;
|
||||||
char *protocol;
|
char *protocol = NULL;
|
||||||
char *target;
|
char *target = NULL;
|
||||||
int port;
|
int port;
|
||||||
int priority;
|
int priority;
|
||||||
int weight;
|
int weight;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user