MdeModulePkg/Ip4Dxe: fix ICMP echo reply memory leak
MdeModulePkg/Ip4Dxe: fix ICMP echo reply memory leak

When UEFI receives ICMP echo packets it will enter Ip4IcmpReplyEcho
function, and then call Ip4Output. However, if Ip4Output gets some
error and exits early, e.g. fails to find the route entry, memory
buffer of "Data" gets no chance to be freed and memory leak will be
caused. If there is such an attacker in the network, we will see UEFI
runs out of memory and system hangs.

So we explicitly free the memory when error status is returned.

Cc: Star Zeng <5c6bb72efe464613af94e84c05522a361b23844a@intel.com>
Cc: Eric Dong <fa9eeec52367040ac98013bc4b2913db170588f8@intel.com>
Cc: Ruiyu Ni <9fa3a6894a36bca79e6a72ad65af5a5702efecd1@intel.com>
Cc: Siyuan Fu <eef549df2036636f79f66102b4e2dc444721df8f@intel.com>
Cc: Jiaxin Wu <91f509c31e98a6df13950454fe51aea543223eaa@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Junbiao Hong <9e1fc750ff1e4c015ea31e5bb98624f84c3b0e9f@huawei.com>
Signed-off-by: Heyi Guo <c5332928fee189fee76555401b7f2e83c5c8a6dc@linaro.org>
Reviewed-by: Siyuan Fu <eef549df2036636f79f66102b4e2dc444721df8f@intel.com>
Reviewed-by: Jiaxin Wu <91f509c31e98a6df13950454fe51aea543223eaa@intel.com>

MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2