summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Vport.c
diff options
context:
space:
mode:
Diffstat (limited to 'datapath-windows/ovsext/Vport.c')
-rw-r--r--datapath-windows/ovsext/Vport.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c
index 075f4199a..7cf2497e3 100644
--- a/datapath-windows/ovsext/Vport.c
+++ b/datapath-windows/ovsext/Vport.c
@@ -1144,8 +1144,13 @@ GetNICAlias(PNDIS_SWITCH_NIC_PARAMETERS nicParam,
if (status == STATUS_SUCCESS) {
RtlStringCbPrintfW(portFriendlyName->String,
IF_MAX_STRING_SIZE, L"%s", interfaceName);
- RtlStringCbLengthW(portFriendlyName->String, IF_MAX_STRING_SIZE,
- &len);
+ status = RtlStringCbLengthW(portFriendlyName->String,
+ IF_MAX_STRING_SIZE, &len);
+ if (!NT_SUCCESS(status)) {
+ OVS_LOG_ERROR("Failed to get the length of the string,"
+ "status: %x", status);
+ return status;
+ }
portFriendlyName->Length = (USHORT)len;
} else {
OVS_LOG_ERROR("Fail to convert interface LUID to alias, status: %x",