Skip to content

Commit 21e5b41

Browse files
authored
potential memory leak without setting Status (#4702)
1 parent 1c3448c commit 21e5b41

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/platform/datapath_raw_xdp_win.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,11 @@ CxPlatDpRawInterfaceInitialize(
578578
if (!SetFileCompletionNotificationModes(
579579
(HANDLE)Queue->RxXsk,
580580
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS | FILE_SKIP_SET_EVENT_ON_HANDLE)) {
581+
Status = QUIC_STATUS_INTERNAL_ERROR;
581582
QuicTraceEvent(
582583
LibraryErrorStatus,
583584
"[ lib] ERROR, %u, %s.",
584-
Status,
585+
GetLastError(),
585586
"SetFileCompletionNotificationModes");
586587
goto Error;
587588
}
@@ -700,10 +701,11 @@ CxPlatDpRawInterfaceInitialize(
700701
if (!SetFileCompletionNotificationModes(
701702
(HANDLE)Queue->TxXsk,
702703
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS | FILE_SKIP_SET_EVENT_ON_HANDLE)) {
704+
Status = QUIC_STATUS_INTERNAL_ERROR;
703705
QuicTraceEvent(
704706
LibraryErrorStatus,
705707
"[ lib] ERROR, %u, %s.",
706-
Status,
708+
GetLastError(),
707709
"SetFileCompletionNotificationModes");
708710
goto Error;
709711
}

0 commit comments

Comments
 (0)