mirror of https://github.com/acidanthera/audk.git
NetworkPkg: Fix a memory leak issue in UDP6 driver
In UDP6Dxe Udp6Groups(), the code return directly without free the buffer allocated for McastIp when JoinFlag is TRUE. It is a memory leak issue that needs to be fixed. This patch is to fix this issue. Cc: Ye Ting <ting.ye@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
parent
2c4a45b361
commit
24ed9cfd23
|
@ -351,6 +351,9 @@ Udp6Groups (
|
||||||
|
|
||||||
Instance = UDP6_INSTANCE_DATA_FROM_THIS (This);
|
Instance = UDP6_INSTANCE_DATA_FROM_THIS (This);
|
||||||
if (!Instance->Configured) {
|
if (!Instance->Configured) {
|
||||||
|
if (McastIp != NULL) {
|
||||||
|
FreePool (McastIp);
|
||||||
|
}
|
||||||
return EFI_NOT_STARTED;
|
return EFI_NOT_STARTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue