REF: https://bugzilla.tianocore.org/show_bug.cgi?id=38
Set MPath to NULL after free(MPath) to guarantee that MPath is not used after the free() call. Cc: Rebecca Cran <[email protected]> Signed-off-by: Michael D Kinney <[email protected]> --- StdLib/LibC/Uefi/Devices/Utility/Path.c | 1 + 1 file changed, 1 insertion(+) diff --git a/StdLib/LibC/Uefi/Devices/Utility/Path.c b/StdLib/LibC/Uefi/Devices/Utility/Path.c index d6728d3..fe19196 100644 --- a/StdLib/LibC/Uefi/Devices/Utility/Path.c +++ b/StdLib/LibC/Uefi/Devices/Utility/Path.c @@ -359,6 +359,7 @@ reclassify: } else if(MPath != NULL) { free(MPath); /* Caller doesn't want it so let MPath go free */ + MPath = NULL; } /* At this point, WPath is an absolute path, -- 2.32.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#79543): https://edk2.groups.io/g/devel/message/79543 Mute This Topic: https://groups.io/mt/84985779/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
