mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
Correct checking of virStrcpyStatic() return value
Correct the check for the return value of virStrcpyStatic() when copying port-profile names. Fixes Open vSwitch ports which utilize port-profiles from network definitions. Signed-off-by: Kyle Mestery <kmestery@cisco.com>
This commit is contained in:
parent
b893e7612f
commit
83aebf6de4
@ -374,7 +374,7 @@ virNetDevVPortProfileMerge(virNetDevVPortProfilePtr orig,
|
||||
orig->profileID, mods->profileID);
|
||||
return -1;
|
||||
}
|
||||
if (virStrcpyStatic(orig->profileID, mods->profileID)) {
|
||||
if (virStrcpyStatic(orig->profileID, mods->profileID) == NULL) {
|
||||
/* this should never happen - it indicates mods->profileID
|
||||
* isn't properly null terminated. */
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
|
Loading…
Reference in New Issue
Block a user