Skip to content

Commit db84d8c

Browse files
committed
Add some member varialbe inits in Transaction class
1 parent 1feaa7d commit db84d8c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CHANGES

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
v3.x.y - YYYY-MMM-DD (to be released)
22
-------------------------------------
33

4+
- Add some member variable inits in Transaction class
5+
[Issue #2886 - @GNU-Plus-Windows-User, @airween, @mdounin, @martinhsv]
46
- Resolve memory leak on reload (bison-generated variable)
57
[Issue #2876 - @martinhsv]
68
- Support equals sign in XPath expressions

src/transaction.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ namespace modsecurity {
101101
*/
102102
Transaction::Transaction(ModSecurity *ms, RulesSet *rules, void *logCbData)
103103
: m_creationTimeStamp(utils::cpu_seconds()),
104-
/* m_clientIpAddress(nullptr), */
104+
m_clientIpAddress(std::make_shared<std::string>("")),
105105
m_httpVersion(""),
106-
/* m_serverIpAddress(""), */
106+
m_serverIpAddress(std::make_shared<std::string>("")),
107107
m_uri(""),
108-
/* m_uri_no_query_string_decoded(""), */
108+
m_uri_no_query_string_decoded(std::make_shared<std::string>("")),
109109
m_ARGScombinedSizeDouble(0),
110110
m_clientPort(0),
111111
m_highestSeverityAction(255),
@@ -175,11 +175,11 @@ Transaction::Transaction(ModSecurity *ms, RulesSet *rules, void *logCbData)
175175

176176
Transaction::Transaction(ModSecurity *ms, RulesSet *rules, char *id, void *logCbData)
177177
: m_creationTimeStamp(utils::cpu_seconds()),
178-
/* m_clientIpAddress(""), */
178+
m_clientIpAddress(std::make_shared<std::string>("")),
179179
m_httpVersion(""),
180-
/* m_serverIpAddress(""), */
180+
m_serverIpAddress(std::make_shared<std::string>("")),
181181
m_uri(""),
182-
/* m_uri_no_query_string_decoded(""), */
182+
m_uri_no_query_string_decoded(std::make_shared<std::string>("")),
183183
m_ARGScombinedSizeDouble(0),
184184
m_clientPort(0),
185185
m_highestSeverityAction(255),

0 commit comments

Comments
 (0)