nodedev: Free the right pointers when getting WWNs fails

This commit is contained in:
Jiri Denemark 2010-08-17 17:49:12 +02:00
parent b31ef77313
commit 47c74e8264

View File

@ -1283,8 +1283,8 @@ virNodeDeviceGetWWNs(virNodeDeviceDefPtr def,
ret = -1;
} else if (*wwnn == NULL || *wwpn == NULL) {
/* Free the other one, if allocated... */
VIR_FREE(wwnn);
VIR_FREE(wwpn);
VIR_FREE(*wwnn);
VIR_FREE(*wwpn);
ret = -1;
virReportOOMError();
}