Merge pull request #1482 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:valgrind_fixes to develop

* commit 'a4e63bb98072868a145c45e8247280ebc86c3a6d':
  Fixed a memory issue flagged by valgrind in the direct_chunk test.
This commit is contained in:
Dana Robinson 2019-01-18 10:40:44 -06:00
commit f81103e89e

View File

@ -1910,10 +1910,10 @@ test_read_unallocated_chunk (hid_t file)
goto error;
/* Write a single chunk to intialize the chunk storage */
HDmemset(&chunk_dims, 0, sizeof(chunk_dims));
HDmemset(direct_buf, 0, CHUNK_NX * CHUNK_NY * sizeof(int));
offset[0] = 0; offset[1] = 0;
if(H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, chunk_nbytes, &chunk_dims) < 0)
if(H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, chunk_nbytes, direct_buf) < 0)
goto error;
/* Attempt to read each chunk in the dataset. Chunks are not allocated,