summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-07-31 22:23:16 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-07-31 22:23:16 (GMT)
commitef1e79b42b1b54639fa262336986276843ffa73d (patch)
tree48095e98843a8ce9d0f08eaa8c3e5aa7bda61c59
parentce28d2097679bd37bec62ef59538692f6ef95be4 (diff)
downloadhdf5-ef1e79b42b1b54639fa262336986276843ffa73d.zip
hdf5-ef1e79b42b1b54639fa262336986276843ffa73d.tar.gz
hdf5-ef1e79b42b1b54639fa262336986276843ffa73d.tar.bz2
[svn-r4287] Purpose:hdf5-1_4_2
Bug Fix Description: H5Pset_driver had a resource leak which was dropping dataset transfer IDs when switching drivers. Solution: Decrement dataset transfer ID reference count properly Platforms tested: IRIX64 6.5 (modi4)
-rw-r--r--src/H5P.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5P.c b/src/H5P.c
index 5e482e3..3654c05 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -1710,8 +1710,9 @@ H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_info)
}
/* Remove old driver */
- if (dxpl->driver_id>=0)
- H5FD_dxpl_free(dxpl->driver_id, dxpl->driver_info);
+ assert(dxpl->driver_id>=0);
+ H5FD_dxpl_free(dxpl->driver_id, dxpl->driver_info);
+ H5I_dec_ref(dxpl->driver_id);
/* Add new driver */
H5I_inc_ref(driver_id);