* When the packet is not normal packet or icmp error packet, the code
does not recycle it by signal RecycleSignal event, and this will
result some memory leak. This patch is to fix this issue.
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ye Ting <ting.ye@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>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
return;\r
}\r
\r
- if (((EFI_SUCCESS != Status) && (EFI_ICMP_ERROR != Status)) || (NULL == RxData)) {\r
+ if ((EFI_SUCCESS != Status) && (EFI_ICMP_ERROR != Status)) {\r
//\r
- // @bug Only process the normal packets and the icmp error packets, if RxData is NULL\r
- // @bug with Status == EFI_SUCCESS or EFI_ICMP_ERROR, just resume the receive although\r
- // @bug this should be a bug of the low layer (IP).\r
+ // Only process the normal packets and the icmp error packets.\r
//\r
+ if (RxData != NULL) {\r
+ goto CleanUp;\r
+ } else {\r
+ goto Resume;\r
+ }\r
+ }\r
+\r
+ //\r
+ // if RxData is NULL with Status == EFI_SUCCESS or EFI_ICMP_ERROR, this should be a code issue in the low layer (IP).\r
+ //\r
+ ASSERT (RxData != NULL);\r
+ if (RxData == NULL) {\r
goto Resume;\r
}\r
\r