* [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe
@ 2017-12-26 6:35 Jiaxin Wu
2017-12-26 6:35 ` [Patch 1/2] NetworkPkg/HttpDxe: Fix the memory leak issue in HttpRequest() Jiaxin Wu
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Jiaxin Wu @ 2017-12-26 6:35 UTC (permalink / raw)
To: edk2-devel; +Cc: Wang Fan, Ye Ting, Fu Siyuan, Wu Jiaxin
Cc: Wang Fan <fan.wang@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: Wu Jiaxin <jiaxin.wu@intel.com>
Jiaxin Wu (2):
NetworkPkg/HttpDxe: Fix the memory leak issue in HttpRequest().
NetworkPkg/HttpDxe: Remove the unnecessary ASSERT.
NetworkPkg/HttpDxe/HttpImpl.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
--
1.9.5.msysgit.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Patch 1/2] NetworkPkg/HttpDxe: Fix the memory leak issue in HttpRequest().
2017-12-26 6:35 [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe Jiaxin Wu
@ 2017-12-26 6:35 ` Jiaxin Wu
2017-12-26 6:35 ` [Patch 2/2] NetworkPkg/HttpDxe: Remove the unnecessary ASSERT Jiaxin Wu
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jiaxin Wu @ 2017-12-26 6:35 UTC (permalink / raw)
To: edk2-devel; +Cc: Wang Fan, Ye Ting, Fu Siyuan, Wu Jiaxin
Cc: Wang Fan <fan.wang@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: Wu Jiaxin <jiaxin.wu@intel.com>
---
NetworkPkg/HttpDxe/HttpImpl.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index 57fa39f..fe1c3b7 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -470,10 +470,12 @@ EfiHttpRequest (
Wrap->TcpWrap.Method = Request->Method;
FreePool (HostName);
+ HttpUrlFreeParser (UrlParser);
+
//
// Queue the HTTP token and return.
//
return EFI_SUCCESS;
} else {
@@ -654,10 +656,14 @@ EfiHttpRequest (
DispatchDpc ();
if (HostName != NULL) {
FreePool (HostName);
}
+
+ if (UrlParser != NULL) {
+ HttpUrlFreeParser (UrlParser);
+ }
return EFI_SUCCESS;
Error5:
//
@@ -697,11 +703,11 @@ Error1:
FreePool (HostName);
}
if (Wrap != NULL) {
FreePool (Wrap);
}
- if (UrlParser!= NULL) {
+ if (UrlParser != NULL) {
HttpUrlFreeParser (UrlParser);
}
return Status;
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Patch 2/2] NetworkPkg/HttpDxe: Remove the unnecessary ASSERT.
2017-12-26 6:35 [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe Jiaxin Wu
2017-12-26 6:35 ` [Patch 1/2] NetworkPkg/HttpDxe: Fix the memory leak issue in HttpRequest() Jiaxin Wu
@ 2017-12-26 6:35 ` Jiaxin Wu
2017-12-27 1:38 ` [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe Fu, Siyuan
2017-12-27 2:16 ` Wang, Fan
3 siblings, 0 replies; 5+ messages in thread
From: Jiaxin Wu @ 2017-12-26 6:35 UTC (permalink / raw)
To: edk2-devel; +Cc: Wang Fan, Ye Ting, Fu Siyuan, Wu Jiaxin
Cc: Wang Fan <fan.wang@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: Wu Jiaxin <jiaxin.wu@intel.com>
---
NetworkPkg/HttpDxe/HttpImpl.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index fe1c3b7..b3a64cf 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -63,11 +63,10 @@ EfiHttpGetModeData (
if ((This == NULL) || (HttpConfigData == NULL)) {
return EFI_INVALID_PARAMETER;
}
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
- ASSERT (HttpInstance != NULL);
if ((HttpConfigData->AccessPoint.IPv6Node == NULL) ||
(HttpConfigData->AccessPoint.IPv4Node == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -147,11 +146,11 @@ EfiHttpConfigure (
(!HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv4Node == NULL)))) {
return EFI_INVALID_PARAMETER;
}
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
- ASSERT (HttpInstance != NULL && HttpInstance->Service != NULL);
+ ASSERT (HttpInstance->Service != NULL);
if (HttpConfigData != NULL) {
if (HttpConfigData->HttpVersion >= HttpVersionUnsupported) {
return EFI_UNSUPPORTED;
@@ -289,11 +288,10 @@ EfiHttpRequest (
(Request->Method != HttpMethodPost) && (Request->Method != HttpMethodPatch)) {
return EFI_UNSUPPORTED;
}
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
- ASSERT (HttpInstance != NULL);
//
// Capture the method into HttpInstance.
//
if (Request != NULL) {
@@ -623,12 +621,10 @@ EfiHttpRequest (
if (EFI_ERROR (Status) || NULL == RequestMsg) {
goto Error3;
}
- ASSERT (RequestMsg != NULL);
-
//
// Every request we insert a TxToken and a response call would remove the TxToken.
// In cases of PUT/POST/PATCH, after an initial request-response pair, we would do a
// continuous request without a response call. So, in such cases, where Request
// structure is NULL, we would not insert a TxToken.
@@ -885,11 +881,10 @@ EfiHttpCancel (
if (This == NULL) {
return EFI_INVALID_PARAMETER;
}
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
- ASSERT (HttpInstance != NULL);
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
return EFI_NOT_STARTED;
}
@@ -1543,11 +1538,10 @@ EfiHttpResponse (
if (HttpMsg == NULL) {
return EFI_INVALID_PARAMETER;
}
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
- ASSERT (HttpInstance != NULL);
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
return EFI_NOT_STARTED;
}
@@ -1639,11 +1633,10 @@ EfiHttpPoll (
if (This == NULL) {
return EFI_INVALID_PARAMETER;
}
HttpInstance = HTTP_INSTANCE_FROM_PROTOCOL (This);
- ASSERT (HttpInstance != NULL);
if (HttpInstance->State != HTTP_STATE_TCP_CONNECTED) {
return EFI_NOT_STARTED;
}
--
1.9.5.msysgit.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe
2017-12-26 6:35 [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe Jiaxin Wu
2017-12-26 6:35 ` [Patch 1/2] NetworkPkg/HttpDxe: Fix the memory leak issue in HttpRequest() Jiaxin Wu
2017-12-26 6:35 ` [Patch 2/2] NetworkPkg/HttpDxe: Remove the unnecessary ASSERT Jiaxin Wu
@ 2017-12-27 1:38 ` Fu, Siyuan
2017-12-27 2:16 ` Wang, Fan
3 siblings, 0 replies; 5+ messages in thread
From: Fu, Siyuan @ 2017-12-27 1:38 UTC (permalink / raw)
To: Wu, Jiaxin, edk2-devel@lists.01.org; +Cc: Ye, Ting, Wang, Fan, Wu, Jiaxin
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Jiaxin Wu
> Sent: Tuesday, December 26, 2017 2:35 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Wang, Fan <fan.wang@intel.com>; Fu,
> Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
> Subject: [edk2] [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe
>
> Cc: Wang Fan <fan.wang@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: Wu Jiaxin <jiaxin.wu@intel.com>
>
> Jiaxin Wu (2):
> NetworkPkg/HttpDxe: Fix the memory leak issue in HttpRequest().
> NetworkPkg/HttpDxe: Remove the unnecessary ASSERT.
>
> NetworkPkg/HttpDxe/HttpImpl.c | 17 ++++++++---------
> 1 file changed, 8 insertions(+), 9 deletions(-)
>
> --
> 1.9.5.msysgit.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe
2017-12-26 6:35 [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe Jiaxin Wu
` (2 preceding siblings ...)
2017-12-27 1:38 ` [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe Fu, Siyuan
@ 2017-12-27 2:16 ` Wang, Fan
3 siblings, 0 replies; 5+ messages in thread
From: Wang, Fan @ 2017-12-27 2:16 UTC (permalink / raw)
To: Wu, Jiaxin, edk2-devel@lists.01.org; +Cc: Ye, Ting, Fu, Siyuan, Wu, Jiaxin
Series reviewed by Wang, Fan <fan.wang@intel.com>.
Best Regards
Fan
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Jiaxin Wu
Sent: Tuesday, December 26, 2017 2:35 PM
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Wang, Fan <fan.wang@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [edk2] [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe
Cc: Wang Fan <fan.wang@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: Wu Jiaxin <jiaxin.wu@intel.com>
Jiaxin Wu (2):
NetworkPkg/HttpDxe: Fix the memory leak issue in HttpRequest().
NetworkPkg/HttpDxe: Remove the unnecessary ASSERT.
NetworkPkg/HttpDxe/HttpImpl.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
--
1.9.5.msysgit.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-27 2:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-26 6:35 [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe Jiaxin Wu
2017-12-26 6:35 ` [Patch 1/2] NetworkPkg/HttpDxe: Fix the memory leak issue in HttpRequest() Jiaxin Wu
2017-12-26 6:35 ` [Patch 2/2] NetworkPkg/HttpDxe: Remove the unnecessary ASSERT Jiaxin Wu
2017-12-27 1:38 ` [Patch 0/2] NetworkPkg/HttpDxe: Fix some issues in HttpDxe Fu, Siyuan
2017-12-27 2:16 ` Wang, Fan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox