mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
nodedev: Free the right pointers when getting WWNs fails
This commit is contained in:
parent
b31ef77313
commit
47c74e8264
@ -1283,8 +1283,8 @@ virNodeDeviceGetWWNs(virNodeDeviceDefPtr def,
|
|||||||
ret = -1;
|
ret = -1;
|
||||||
} else if (*wwnn == NULL || *wwpn == NULL) {
|
} else if (*wwnn == NULL || *wwpn == NULL) {
|
||||||
/* Free the other one, if allocated... */
|
/* Free the other one, if allocated... */
|
||||||
VIR_FREE(wwnn);
|
VIR_FREE(*wwnn);
|
||||||
VIR_FREE(wwpn);
|
VIR_FREE(*wwpn);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user