diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-12-18 17:52:43 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-12-18 17:52:43 (GMT) |
commit | ddbc06fce64bc49ff6b3e83da3ff74d08251fc2c (patch) | |
tree | 2fd1ab62b539b7c05a2adf461006e1c07d6f3535 /src/H5HFhuge.c | |
parent | 9236c9a148aaf206294be0554cf78e7ab769bd51 (diff) | |
download | hdf5-ddbc06fce64bc49ff6b3e83da3ff74d08251fc2c.zip hdf5-ddbc06fce64bc49ff6b3e83da3ff74d08251fc2c.tar.gz hdf5-ddbc06fce64bc49ff6b3e83da3ff74d08251fc2c.tar.bz2 |
[svn-r13067] Description:
Add [quite] limited ability to update (ie. write) data for objects in
fractal heap. Limited to just updating objects in managed heap blocks (i.e.
not 'tiny' or 'huge' objects) and must be updated with data of the same length
as the object in the heap. Updating objects in compressed heaps does work
though [as long as the data isn't 'tiny' or 'huge'].
Needed for changing the data value or the name of an attribute that is
stored in dense or shared storage.
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5HFhuge.c')
-rw-r--r-- | src/H5HFhuge.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c index da9f1a4..e2663cd 100644 --- a/src/H5HFhuge.c +++ b/src/H5HFhuge.c @@ -589,7 +589,7 @@ static herr_t H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, hbool_t is_read, H5HF_operator_t op, void *op_data) { - void *read_buf; /* Pointer to buffer for reading */ + void *read_buf = NULL; /* Pointer to buffer for reading */ haddr_t obj_addr; /* Object's address in the file */ size_t obj_size = 0; /* Object's size in the file */ unsigned filter_mask = 0; /* Filter mask for object (only used for filtered objects) */ @@ -697,11 +697,11 @@ H5HF_huge_op_real(H5HF_hdr_t *hdr, hid_t dxpl_id, const uint8_t *id, } /* end if */ } /* end if */ +done: /* Release the buffer for reading */ - if(hdr->filter_len > 0 || !is_read) + if(read_buf && read_buf != op_data) H5MM_xfree(read_buf); -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5HF_huge_op_real() */ |