summaryrefslogtreecommitdiffstats
path: root/src/H5L.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-02 20:00:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-02 20:00:21 (GMT)
commit22be11f0d9cd3e0e366b2b4dfe14933fdcf3687e (patch)
tree4509bae15cd445b09e38584d5bee2b2fc27ae67a /src/H5L.c
parentfa94f16ad894ccbd3ab5b3a7a0f9bf74c6ea4d9e (diff)
downloadhdf5-22be11f0d9cd3e0e366b2b4dfe14933fdcf3687e.zip
hdf5-22be11f0d9cd3e0e366b2b4dfe14933fdcf3687e.tar.gz
hdf5-22be11f0d9cd3e0e366b2b4dfe14933fdcf3687e.tar.bz2
[svn-r14175] Description:
Minor fixes to avoid memory leaks when 'realloc' fails. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5L.c')
-rw-r--r--src/H5L.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5L.c b/src/H5L.c
index 49ef879..d9f8e0d 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -1354,7 +1354,7 @@ H5L_register(const H5L_class_t *cls)
/* Filter not already registered */
if(i >= H5L_table_used_g) {
if(H5L_table_used_g >= H5L_table_alloc_g) {
- size_t n = MAX(H5L_MIN_TABLE_SIZE, 2 * H5L_table_alloc_g);
+ size_t n = MAX(H5L_MIN_TABLE_SIZE, (2 * H5L_table_alloc_g));
H5L_class_t *table = (H5L_class_t *)H5MM_realloc(H5L_table_g, (n * sizeof(H5L_class_t)));
if(!table)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend link type table")