summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-01-03 01:03:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-01-03 01:03:08 (GMT)
commitd4f3d93b8d9188548407453e10df12dc9ba0480f (patch)
tree97b26194d723abe4db0b866d082526e280e8b4e4 /src
parent42bf0e2136a60a9dc18a2a2a5fb029fa5a0d6562 (diff)
downloadhdf5-d4f3d93b8d9188548407453e10df12dc9ba0480f.zip
hdf5-d4f3d93b8d9188548407453e10df12dc9ba0480f.tar.gz
hdf5-d4f3d93b8d9188548407453e10df12dc9ba0480f.tar.bz2
[svn-r28769] Description:
More memory cleanups and leak elimination. Tested on: MacOSX/64 10.11.2 (amazon) w/serial & parallel (h5committest forthcoming)
Diffstat (limited to 'src')
-rw-r--r--src/H5Dcompact.c5
-rw-r--r--src/H5Eint.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index ebe75bd..df2a740 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -440,12 +440,9 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst
HDassert(storage_src);
HDassert(f_dst);
HDassert(storage_dst);
+ HDassert(storage_dst->buf);
HDassert(dt_src);
- /* Allocate space for destination data */
- if(NULL == (storage_dst->buf = H5MM_malloc(storage_src->size)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "unable to allocate memory for compact dataset")
-
/* Create datatype ID for src datatype, so it gets freed */
if((tid_src = H5I_register(H5I_DATATYPE, dt_src, FALSE)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register source file datatype")
diff --git a/src/H5Eint.c b/src/H5Eint.c
index 6e84a09..6ed405f 100644
--- a/src/H5Eint.c
+++ b/src/H5Eint.c
@@ -743,8 +743,13 @@ H5E_printf_stack(H5E_t *estack, const char *file, const char *func, unsigned lin
done:
if(va_started)
va_end(ap);
+#ifdef H5_HAVE_VASPRINTF
+ if(tmp)
+ HDfree(tmp);
+#else /* H5_HAVE_VASPRINTF */
if(tmp)
H5MM_xfree(tmp);
+#endif /* H5_HAVE_VASPRINTF */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5E_printf_stack() */