From d3d48e769b2f17732a208ac4c2cae3b34e6fb32b Mon Sep 17 00:00:00 2001 From: Joachim Gabler Date: Tue, 17 Sep 2024 13:18:47 +0200 Subject: [PATCH] fixed memory leak in japi // BelongsTo: CS-582 --- source/libs/gdi/sge_gdi_data.cc | 8 ++++++++ source/libs/japi/japi.cc | 1 + source/libs/uti/sge_csp_path.h | 2 -- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/source/libs/gdi/sge_gdi_data.cc b/source/libs/gdi/sge_gdi_data.cc index 690da1649..f239327f1 100644 --- a/source/libs/gdi/sge_gdi_data.cc +++ b/source/libs/gdi/sge_gdi_data.cc @@ -124,6 +124,14 @@ static void gdi_data_ts_destroy() { DENTER(TOP_LAYER); pthread_mutex_destroy(&ts.mutex); + + /* @todo CS-591 don't we have to free all the other attributes as well? + * char *master_host; + * u_long64 timestamp_qmaster_file; + * char *ssl_private_key; + * char *ssl_certificate; + * sge_csp_path_class_t *csp_path_obj; + */ DRETURN_VOID; } diff --git a/source/libs/japi/japi.cc b/source/libs/japi/japi.cc index 16e09a37f..21bdc9c15 100644 --- a/source/libs/japi/japi.cc +++ b/source/libs/japi/japi.cc @@ -405,6 +405,7 @@ int japi_init_mt(dstring *diag) lFreeList(&alp); DRETURN(DRMAA_ERRNO_INTERNAL_ERROR); } + lFreeList(&alp); DRETURN(DRMAA_ERRNO_SUCCESS); } diff --git a/source/libs/uti/sge_csp_path.h b/source/libs/uti/sge_csp_path.h index 83eb3c7b0..915ed4aac 100644 --- a/source/libs/uti/sge_csp_path.h +++ b/source/libs/uti/sge_csp_path.h @@ -92,5 +92,3 @@ sge_csp_path_class_t * sge_csp_path_class_create(sge_error_class_t *eh); void sge_csp_path_class_destroy(sge_csp_path_class_t **pst); - -void sge_csp_path_class_destroy(sge_csp_path_class_t **pst);