This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.1.x by this push:
new 2a0b29f Eliminate next dup call using stale mime field mloc is
s3_auth plugin. (#7825)
2a0b29f is described below
commit 2a0b29f4b718e18b53aa942c616a4c198bc47f0b
Author: Walt Karas <[email protected]>
AuthorDate: Wed May 12 17:42:47 2021 -0500
Eliminate next dup call using stale mime field mloc is s3_auth plugin.
(#7825)
(cherry picked from commit f8ddad16c3be2e142c8f6782449fda35e0020318)
---
plugins/s3_auth/s3_auth.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/s3_auth/s3_auth.cc b/plugins/s3_auth/s3_auth.cc
index 5b381ab..b0cbe243 100644
--- a/plugins/s3_auth/s3_auth.cc
+++ b/plugins/s3_auth/s3_auth.cc
@@ -722,6 +722,7 @@ S3Request::set_header(const char *header, int header_len,
const char *val, int v
bool first = true;
while (field_loc) {
+ tmp = TSMimeHdrFieldNextDup(_bufp, _hdr_loc, field_loc);
if (first) {
first = false;
if (TS_SUCCESS == TSMimeHdrFieldValueStringSet(_bufp, _hdr_loc,
field_loc, -1, val, val_len)) {
@@ -730,7 +731,6 @@ S3Request::set_header(const char *header, int header_len,
const char *val, int v
} else {
TSMimeHdrFieldDestroy(_bufp, _hdr_loc, field_loc);
}
- tmp = TSMimeHdrFieldNextDup(_bufp, _hdr_loc, field_loc);
TSHandleMLocRelease(_bufp, _hdr_loc, field_loc);
field_loc = tmp;
}