13
13
* Copyright (c) 2008-2016 University of Houston. All rights reserved.
14
14
* Copyright (c) 2011-2015 Cisco Systems, Inc. All rights reserved.
15
15
* Copyright (c) 2012-2013 Inria. All rights reserved.
16
- * Copyright (c) 2015-2016 Research Organization for Information Science
16
+ * Copyright (c) 2015-2017 Research Organization for Information Science
17
17
* and Technology (RIST). All rights reserved.
18
18
* $COPYRIGHT$
19
19
*
@@ -315,6 +315,9 @@ int mca_io_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh,
315
315
int y = 0 ;
316
316
317
317
fh -> f_init_num_aggrs = num_groups ;
318
+ if (NULL != fh -> f_init_aggr_list ) {
319
+ free (fh -> f_init_aggr_list );
320
+ }
318
321
fh -> f_init_aggr_list = (int * )malloc (fh -> f_init_num_aggrs * sizeof (int ));
319
322
if (NULL == fh -> f_init_aggr_list ) {
320
323
opal_output (1 , "OUT OF MEMORY\n" );
@@ -325,6 +328,9 @@ int mca_io_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh,
325
328
for ( y = 0 ; y < contg_groups [z ].procs_per_contg_group ; y ++ ){
326
329
if ( fh -> f_rank == contg_groups [z ].procs_in_contg_group [y ] ) {
327
330
fh -> f_init_procs_per_group = contg_groups [z ].procs_per_contg_group ;
331
+ if (NULL != fh -> f_init_procs_in_group ) {
332
+ free (fh -> f_init_procs_in_group );
333
+ }
328
334
fh -> f_init_procs_in_group = (int * )malloc (fh -> f_init_procs_per_group * sizeof (int ));
329
335
if (NULL == fh -> f_init_procs_in_group ) {
330
336
opal_output (1 , "OUT OF MEMORY\n" );
0 commit comments