Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Memory Leak #4504

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
2 changes: 2 additions & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
- Fix: memory leak in POST /v2/op/notify operation (#4261)
- Fix: service path levels with 0 length should not be allowed (#4495)
- Fix: changed the default value of `-dbTimeout` to 0 to resolve conflict with `-dbURI` (#4496)
- Fix: wrong INFO startup log showing ORION_MONGO_TIMEOUT, ORION_IN_REQ_PAYLOAD_MAX_SIZE and ORION_OUT_REQ_MSG_MAX_SIZE env var values (#4496)
- Fix: return 400 Bad Request when subject.entities exists but it is an empty array (#4499)

2 changes: 2 additions & 0 deletions src/lib/jsonParseV2/parseNotification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ static bool parseNotificationData

if (parseContextElementResponse(ciP, iter2, cerP, oeP) == false)
{
//delete the allocated memory and return false
delete cerP;
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ payload='{
}
]
}'
# FIXME #4261. Once the issue gets solved, this line should be uncommented
# The REGEXPECT part would need a little adapation after that
#orionCurl --url /v2/op/notify -X POST --payload "$payload" > /dev/null
orionCurl --url /v2/op/notify -X POST --payload "$payload" > /dev/null


payload='{
Expand Down Expand Up @@ -263,7 +261,7 @@ Content-Length: REGEX(\d+)
"deprecatedFeatures": {
"ngsiv1Requests": 7
},
"jsonRequests": 16,
"jsonRequests": 17,
"noPayloadRequests": 42,
"requests": {
"/admin/log": {
Expand Down Expand Up @@ -317,14 +315,17 @@ Content-Length: REGEX(\d+)
"POST": 1,
"PUT": 1
},
"/v2/op/notify": {
"POST": 1
},
"/v2/op/query": {
"OPTIONS": 1,
"POST": 1
},
"/v2/op/update": {
"OPTIONS": 1,
"POST": 1
},
},
"/v2/registrations": {
"GET": 1,
"OPTIONS": 1,
Expand Down
Loading