Fixing open session function memory leak

Change-Id: I5e5d5589f3f9f4ddede641ea0f2de0a7e520ef0a
Signed-off-by: TanelDettenborn <tanel.dettenborn@intel.com>