Navigation Menu

Skip to content

Commit

Permalink
Coverity issues in contrail-analytics/QEOpServerProxy.cc
Browse files Browse the repository at this point in the history
I have run Coverity on branch R5.0 and it reported the following issues in contrail-analytics/QEOpServerProxy.cc:
- Variable c going out of scope leaks the storage it points to in QEOpServerProxy.cc:QueryError
- Variable c going out of scope leaks the storage it points to in QEOpServerProxy.cc:StartPipeline

Change-Id: I119b2d2c2215adcaeb8967c2770809056faa771a
Closes-Bug: #1770148
Signed-off-by: Anda Nicolae <anicolae@lenovo.com>
  • Loading branch information
Anda Nicolae committed May 9, 2018
1 parent 6edaa55 commit d16aa3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrail-query-engine/QEOpServerProxy.cc
Expand Up @@ -708,6 +708,7 @@ class QEOpServerProxy::QEOpServerImpl {
if (c->err) {
QE_LOG_NOQID(ERROR, "Cannot report query error for " << qid <<
" . No Redis Connection");
redisFree(c);
return;
}
//Authenticate the context with password
Expand Down Expand Up @@ -752,6 +753,7 @@ class QEOpServerProxy::QEOpServerImpl {
if (c->err) {
QE_LOG_NOQID(ERROR, "Cannot start Pipleline for " << qid <<
" . No Redis Connection");
redisFree(c);
qs.set_error("No Redis Connection");
QUERY_PERF_INFO_SEND(Sandesh::source(), // name
"__UNKNOWN__", // table
Expand Down

0 comments on commit d16aa3e

Please sign in to comment.