summaryrefslogtreecommitdiff
path: root/security/nss/lib/libpkix
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/lib/libpkix')
-rw-r--r--security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c7
-rw-r--r--security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c b/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c
index 9e1072a96..faadd646b 100644
--- a/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c
+++ b/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c
@@ -252,7 +252,7 @@ pkix_pl_HttpDefaultClient_HdrCheckComplete(
}
comp = PORT_Strcasecmp(nextHeader, "content-type");
if (comp == 0) {
- client->rcvContentType = value;
+ client->rcvContentType = PORT_Strdup(value);
} else {
comp = PORT_Strcasecmp(nextHeader, "content-length");
if (comp == 0) {
@@ -480,7 +480,10 @@ pkix_pl_HttpDefaultClient_Destroy(
PKIX_PL_Free(client->rcvHeaders, plContext);
client->rcvHeaders = NULL;
}
-
+ if (client->rcvContentType) {
+ PORT_Free(client->rcvContentType);
+ client->rcvContentType = NULL;
+ }
if (client->GETBuf != NULL) {
PR_smprintf_free(client->GETBuf);
client->GETBuf = NULL;
diff --git a/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h b/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h
index 1ce1f7b08..053477987 100644
--- a/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h
+++ b/security/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h
@@ -93,7 +93,7 @@ struct PKIX_PL_HttpDefaultClientStruct {
char *rcvBuf;
char *host;
char *path;
- const char *rcvContentType;
+ char *rcvContentType;
void *rcvHeaders;
HttpMethod send_http_method;
const char *send_http_content_type;