Skip to content

Commit 7fe6840

Browse files
committed
state/hnp: plug a memory leak
Signed-off-by: Gilles Gouaillardet <[email protected]>
1 parent 4d58b8d commit 7fe6840

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

orte/mca/state/hnp/state_hnp.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
33
* All rights reserved.
44
* Copyright (c) 2014 Intel, Inc. All rights reserved
5+
* Copyright (c) 2017 Research Organization for Information Science
6+
* and Technology (RIST). All rights reserved.
57
* $COPYRIGHT$
68
*
79
* Additional copyrights may follow
@@ -190,10 +192,9 @@ static int finalize(void)
190192
opal_list_item_t *item;
191193

192194
/* cleanup the proc state machine */
193-
while (NULL != (item = opal_list_remove_first(&orte_proc_states))) {
194-
OBJ_RELEASE(item);
195-
}
196-
OBJ_DESTRUCT(&orte_proc_states);
195+
OPAL_LIST_DESTRUCT(&orte_proc_states);
196+
/* cleanup the job state machine */
197+
OPAL_LIST_DESTRUCT(&orte_job_states);
197198

198199
return ORTE_SUCCESS;
199200
}

0 commit comments

Comments
 (0)