Skip to content

Commit

Permalink
Add missing ENGINE_free's to correctly release the structural referen…
Browse files Browse the repository at this point in the history
…ces.

Change-Id: Ib61eb27ba89de6f5a6fbce6e85fc913d201042c0
Signed-off-by: Steve Linsell <stevenx.linsell@intel.com>
  • Loading branch information
stevelinsell committed Apr 3, 2017
1 parent cdae8c4 commit e66d25d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions e_qat.c
Expand Up @@ -251,9 +251,12 @@ CpaInstanceHandle get_next_inst(void)
if(!qat_engine_init(e)){
WARN("Failure in qat_engine_init function\n");
instance_handle = NULL;
ENGINE_free(e);
return instance_handle;
}

ENGINE_free(e);

/* Anytime we use external polling then we want to loop
through the instances. Any time we are using internal polling
then we also want to loop through the instances assuming
Expand Down Expand Up @@ -294,6 +297,7 @@ static void engine_init_child_at_fork_handler(void)
WARN("Failure in qat_engine_init function\n");
QATerr(QAT_F_ENGINE_INIT_CHILD_AT_FORK_HANDLER, QAT_R_ENGINE_INIT_FAILURE);
}
ENGINE_free(e);
}


Expand All @@ -316,6 +320,7 @@ static void engine_finish_before_fork_handler(void)
}

qat_engine_finish_int(e, QAT_RETAIN_GLOBALS);
ENGINE_free(e);

keep_polling = 1;
}
Expand Down

0 comments on commit e66d25d

Please sign in to comment.