mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: Fix label name in virDomainGraphicsListensParseXML
Use 'cleanup' since it's also used on success.
This commit is contained in:
parent
9982758cc5
commit
0a07bf3dc5
@ -11136,20 +11136,20 @@ virDomainGraphicsListensParseXML(virDomainGraphicsDefPtr def,
|
|||||||
/* parse the <listen> subelements for graphics types that support it */
|
/* parse the <listen> subelements for graphics types that support it */
|
||||||
nListens = virXPathNodeSet("./listen", ctxt, &listenNodes);
|
nListens = virXPathNodeSet("./listen", ctxt, &listenNodes);
|
||||||
if (nListens < 0)
|
if (nListens < 0)
|
||||||
goto error;
|
goto cleanup;
|
||||||
|
|
||||||
if (nListens > 0) {
|
if (nListens > 0) {
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (VIR_ALLOC_N(def->listens, nListens) < 0)
|
if (VIR_ALLOC_N(def->listens, nListens) < 0)
|
||||||
goto error;
|
goto cleanup;
|
||||||
|
|
||||||
for (i = 0; i < nListens; i++) {
|
for (i = 0; i < nListens; i++) {
|
||||||
if (virDomainGraphicsListenDefParseXML(&def->listens[i], def,
|
if (virDomainGraphicsListenDefParseXML(&def->listens[i], def,
|
||||||
listenNodes[i],
|
listenNodes[i],
|
||||||
i == 0 ? node : NULL,
|
i == 0 ? node : NULL,
|
||||||
flags) < 0)
|
flags) < 0)
|
||||||
goto error;
|
goto cleanup;
|
||||||
|
|
||||||
def->nListens++;
|
def->nListens++;
|
||||||
}
|
}
|
||||||
@ -11177,7 +11177,7 @@ virDomainGraphicsListensParseXML(virDomainGraphicsDefPtr def,
|
|||||||
* <graphics/> element. */
|
* <graphics/> element. */
|
||||||
if (def->nListens == 0) {
|
if (def->nListens == 0) {
|
||||||
if (VIR_APPEND_ELEMENT(def->listens, def->nListens, newListen) < 0)
|
if (VIR_APPEND_ELEMENT(def->listens, def->nListens, newListen) < 0)
|
||||||
goto error;
|
goto cleanup;
|
||||||
} else {
|
} else {
|
||||||
virDomainGraphicsListenDefPtr glisten = &def->listens[0];
|
virDomainGraphicsListenDefPtr glisten = &def->listens[0];
|
||||||
|
|
||||||
@ -11195,7 +11195,7 @@ virDomainGraphicsListensParseXML(virDomainGraphicsDefPtr def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
error:
|
cleanup:
|
||||||
virDomainGraphicsListenDefClear(&newListen);
|
virDomainGraphicsListenDefClear(&newListen);
|
||||||
VIR_FREE(listenNodes);
|
VIR_FREE(listenNodes);
|
||||||
VIR_FREE(socketPath);
|
VIR_FREE(socketPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user