1
1
Fixed a condition test while checking that all segments are empty.
Without this fix, a NULL segment pointer could make it past the
test, resulting in a SegV when dereferenced.

This commit was SVN r15891.

The following Trac tickets were found above:
  Ticket 1134 --> https://svn.open-mpi.org/trac/ompi/ticket/1134
Этот коммит содержится в:
Brad Benton 2007-08-16 19:39:52 +00:00
родитель 1ddba9ec65
Коммит c254645383

Просмотреть файл

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2007 IBM Corp., All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -313,13 +314,13 @@ int mca_allocator_bucket_cleanup(mca_allocator_base_module_t * mem)
continue; continue;
} }
/* first we suppose the execution is correct and all chunks /* first we suppose the execution is correct and all chunks
* have ben correctly released. Therefore, if we make sure * have been correctly released. Therefore, if we make sure
* all segments only contain free items then we can release * all segments only contain free items then we can release
* everything in one go. * everything in one go.
*/ */
empty = true; empty = true;
segment = mem_options->buckets[i].segment_head; segment = mem_options->buckets[i].segment_head;
while( (true != empty) || (NULL != segment) ) { while( (true == empty) && (NULL != segment) ) {
first_chunk = segment->first_chunk; first_chunk = segment->first_chunk;
chunk = first_chunk; chunk = first_chunk;
/* determine if the segment is free */ /* determine if the segment is free */