diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-02 20:00:21 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-02 20:00:21 (GMT) |
commit | 22be11f0d9cd3e0e366b2b4dfe14933fdcf3687e (patch) | |
tree | 4509bae15cd445b09e38584d5bee2b2fc27ae67a /src/H5L.c | |
parent | fa94f16ad894ccbd3ab5b3a7a0f9bf74c6ea4d9e (diff) | |
download | hdf5-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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") |