summaryrefslogtreecommitdiffstats
path: root/hl/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-07-08 15:52:49 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-07-08 15:52:49 (GMT)
commit528e0d1cac689310beecf02e56a10b764afa2651 (patch)
tree55b458aedb657440c0cd124f9d6d9f521153db6f /hl/examples
parent38bdc241ed4f62c9d628de563f6f98f3dda6281c (diff)
downloadhdf5-528e0d1cac689310beecf02e56a10b764afa2651.zip
hdf5-528e0d1cac689310beecf02e56a10b764afa2651.tar.gz
hdf5-528e0d1cac689310beecf02e56a10b764afa2651.tar.bz2
[svn-r23869] HDFFV-8302: replace (v)snprintf with _(v)snprintf for windows. Merge from trunk along with other windows functions and HD prefix corrections.
HDFFV-8394: Add cmake code to package examples Tested: local linux
Diffstat (limited to 'hl/examples')
-rw-r--r--hl/examples/ex_image2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hl/examples/ex_image2.c b/hl/examples/ex_image2.c
index 77398c4..76c3a75 100644
--- a/hl/examples/ex_image2.c
+++ b/hl/examples/ex_image2.c
@@ -46,6 +46,10 @@ int main( void )
/* make the image */
status=H5IMmake_image_8bit( file_id, IMAGE1_NAME, width, height, gbuf );
+ if (gbuf) {
+ free(gbuf);
+ gbuf = NULL;
+ }
/*-------------------------------------------------------------------------
* define a palette, blue to red tones
@@ -75,6 +79,10 @@ int main( void )
/* make dataset */
status=H5IMmake_image_24bit( file_id, IMAGE2_NAME, width, height, "INTERLACE_PIXEL", gbuf );
+ if (gbuf) {
+ free(gbuf);
+ gbuf = NULL;
+ }
/* close the file. */
H5Fclose( file_id );