Skip to content

Commit

Permalink
Plug leak in ssg client close path.
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelkgutierrez committed Apr 24, 2018
1 parent 4e2c104 commit 7ba33d5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/sdsdkv-client.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,12 @@ struct sdsdkv_client : public personality {
}
sdskv_client_finalize(m_kvcl);
//
ssg_group_destroy(m_gid);
ssg_finalize();
rc = ssg_group_detach(m_gid);
if (rc != SSG_SUCCESS) return SDSDKV_ERR_SERVICE;
rc = ssg_group_destroy(m_gid);
if (rc != SSG_SUCCESS) return SDSDKV_ERR_SERVICE;
rc = ssg_finalize();
if (rc != SSG_SUCCESS) return SDSDKV_ERR_SERVICE;
//
ch_placement_finalize(m_place);
//
Expand Down
8 changes: 3 additions & 5 deletions src/sdsdkv-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,14 @@ struct sdsdkv_server : public personality {
m_mpi->get_world_id()
);
#endif
//
ssg_group_destroy(m_gid);
ssg_finalize();
//
return SDSDKV_SUCCESS;
}
int
close(void)
{
//margo_finalize(m_mid);
ssg_group_destroy(m_gid);
ssg_finalize();
//
return SDSDKV_SUCCESS;
}
//
Expand Down
2 changes: 1 addition & 1 deletion tests/trivial.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ main(int argc, char **argv)
/* .init_comm = */
MPI_COMM_WORLD,
/* .personality = */
(rank % 2 == 0) ? SDSDKV_PERSONALITY_CLIENT : SDSDKV_PERSONALITY_SERVER,
(rank % 2 == 0) ? SDSDKV_PERSONALITY_SERVER: SDSDKV_PERSONALITY_CLIENT,
/* .hash_be = */
SDSDKV_HASHING_CH_PLACEMENT,
/* .db_type = */
Expand Down

0 comments on commit 7ba33d5

Please sign in to comment.