Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
dcdb
dcdb
Commits
1a435282
Commit
1a435282
authored
Jan 20, 2020
by
Alessio Netti
Browse files
libdcdb: fixed a Cassandra-related memory leak on sensor-publish ops
parent
d87022f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/src/sensorconfig.cpp
View file @
1a435282
...
...
@@ -963,7 +963,6 @@ SCError SensorConfigImpl::getPublicSensorByName(PublicSensor& sensor, const char
const
CassValue
*
opSet
=
nullptr
;
CassIterator
*
opSetIt
=
nullptr
;
if
((
opSet
=
cass_row_get_column_by_name
(
row
,
"operations"
))
&&
(
opSetIt
=
cass_iterator_from_collection
(
opSet
)))
{
CassIterator
*
opSetIt
=
cass_iterator_from_collection
(
opSet
);
const
char
*
opString
;
size_t
opLen
;
...
...
@@ -1495,6 +1494,8 @@ SCError SensorConfigImpl::setOperations(std::string publicName, std::set<std::st
rc
=
cass_future_error_code
(
future
);
if
(
rc
!=
CASS_OK
)
{
connection
->
printError
(
future
);
cass_future_free
(
future
);
cass_collection_free
(
cassSet
);
return
SC_UNKNOWNERROR
;
}
...
...
@@ -1517,7 +1518,8 @@ SCError SensorConfigImpl::setOperations(std::string publicName, std::set<std::st
else
{
error
=
SC_OK
;
}
cass_future_free
(
future
);
cass_statement_free
(
statement
);
cass_prepared_free
(
prepared
);
cass_collection_free
(
cassSet
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment