Added fencepost for cross-dll memory freeing in Windows/Visual Studio

This commit is contained in:
Ward Fisher 2015-01-30 14:30:41 -07:00 committed by Ward Fisher
parent 2d72b7ca7f
commit dd2318b725

View File

@ -1281,7 +1281,11 @@ read_type(NC_GRP_INFO_T *grp, hid_t hdf_typeid, char *type_name)
#ifndef JNA #ifndef JNA
/* Free the member name (which HDF5 allocated for us). */ /* Free the member name (which HDF5 allocated for us). */
/* On Windows using the microsoft runtime, it is an error
for one library to free memory allocated by a different library. */
#ifndef _MSC_VER
if(member_name != NULL) free(member_name); if(member_name != NULL) free(member_name);
#endif
#endif #endif
member_name = NULL; member_name = NULL;
} }