diff --git a/src/smap/configure_functions.c b/src/smap/configure_functions.c index ade5dddd1092b6bac2d319b8e2ed2838c915f234..80465d8d6922a220fd3be4399c4a57533e49442c 100644 --- a/src/smap/configure_functions.c +++ b/src/smap/configure_functions.c @@ -294,8 +294,8 @@ static int _alter_allocation(char *com, List allocated_partitions) static int _copy_allocation(char *com, List allocated_partitions) { ListIterator results_i; - allocated_part_t *allocated_part; - allocated_part_t *temp_part; + allocated_part_t *allocated_part = NULL; + allocated_part_t *temp_part = NULL; pa_request_t *request; int i=0; @@ -307,7 +307,7 @@ static int _copy_allocation(char *com, List allocated_partitions) while(com[i-1]!=' ' && i<=len) { i++; } - + if(i<=len) { if(com[i]>='0' && com[i]<='9') count = atoi(com+i); @@ -323,7 +323,7 @@ static int _copy_allocation(char *com, List allocated_partitions) } } } - + results_i = list_iterator_create(allocated_partitions); while((allocated_part = list_next(results_i)) != NULL) { temp_part = allocated_part; @@ -339,10 +339,9 @@ static int _copy_allocation(char *com, List allocated_partitions) if(!allocated_part) { memset(error_string,0,255); sprintf(error_string, "Could not find requested record to copy"); - xfree(request); return 0; } - + for(i=0;i<count;i++) { request = (pa_request_t*) xmalloc(sizeof(pa_request_t)); diff --git a/src/smap/partition_functions.c b/src/smap/partition_functions.c index 2dbeebc45f8007070ec30ab9d837320db0426db4..05280805868f01b4ad870b0f0a0742fe714ea31b 100644 --- a/src/smap/partition_functions.c +++ b/src/smap/partition_functions.c @@ -649,14 +649,15 @@ static void _read_part_db2(void) //block_t *block_ptr; char *user_name; - if (bgl) { - /* if we have a single base partition, we can't - * run rm_bgl_free, so just read the data once - * and never free it. There is also no sense in - * processing it again either. */ - list_for_each(block_list, _clear_printed_flag, NULL); - return; - } else { + /* if (bgl) { */ +/* /\* if we have a single base partition, we can't */ +/* * run rm_bgl_free, so just read the data once */ +/* * and never free it. There is also no sense in */ +/* * processing it again either. *\/ */ +/* printf("suck again\n"); */ +/* list_for_each(block_list, _clear_printed_flag, NULL); */ +/* return; */ +/* } else { */ if (!getenv("DB2INSTANCE") || !getenv("VWSPATH")) { fprintf(stderr, "Missing DB2INSTANCE or VWSPATH env var.\n" "Execute 'db2profile'\n"); @@ -672,7 +673,7 @@ static void _read_part_db2(void) error("rm_get_BGL(): %s\n", bgl_err_str(rc)); return; } - } + //} if (block_list) { /* clear the old list */ @@ -800,7 +801,7 @@ static void _read_part_db2(void) /* perform post-processing for each bluegene partition */ list_for_each(block_list, _post_block_read, NULL); - slurm_rm_free_BGL(bgl); + rm_free_BGL(bgl); #endif }