summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-07-31 22:25:53 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-07-31 22:25:53 (GMT)
commit0d6d3eafe4458b141f44a1ef119ee1fc72b01714 (patch)
treebaf8bf1c203770b3dd0c503bec28bd6277e9f301 /src
parentf972e20383a17f2d72d14a951f9bee8933c1ab4f (diff)
downloadhdf5-0d6d3eafe4458b141f44a1ef119ee1fc72b01714.zip
hdf5-0d6d3eafe4458b141f44a1ef119ee1fc72b01714.tar.gz
hdf5-0d6d3eafe4458b141f44a1ef119ee1fc72b01714.tar.bz2
[svn-r4288] Purpose:
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)
Diffstat (limited to 'src')
-rw-r--r--src/H5P.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5P.c b/src/H5P.c
index 79c1e71..81e155e 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -1700,8 +1700,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);