diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2012-03-22 19:31:01 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2012-03-22 19:31:01 (GMT) |
commit | daef205d04464c96d933727d1e97378cbfe094cf (patch) | |
tree | a458bc959f3027df3f1d87f62d3762e804c2c3ef /src/H5Dchunk.c | |
parent | 0d2f2074cb64114fdd8aea5164e114d08d621f1b (diff) | |
download | hdf5-daef205d04464c96d933727d1e97378cbfe094cf.zip hdf5-daef205d04464c96d933727d1e97378cbfe094cf.tar.gz hdf5-daef205d04464c96d933727d1e97378cbfe094cf.tar.bz2 |
[svn-r22122] Issue 7785 - Writing or reading many small chunks ran out of memory and caused seg fault. I added checks in two places to make sure the library returns error stack
when it fails to allocate memory. I didn't add any test to the test suite since there is no good way to test it. But I tested and verified the error stack by hand.
Tested on jam, koala, ostrich.
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r-- | src/H5Dchunk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 46925a1..af888a9 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -974,7 +974,7 @@ H5D_free_chunk_info(void *item, void UNUSED *key, void UNUSED *opdata) H5S_select_all(chunk_info->fspace, TRUE); /* Close the chunk's memory dataspace, if it's not shared */ - if(!chunk_info->mspace_shared) + if(!chunk_info->mspace_shared && chunk_info->mspace) (void)H5S_close(chunk_info->mspace); /* Free the actual chunk info */ |