netcdf-c/libsrc
Greg Sjaardema 6ae132e81c
Eliminate double-free in realloc'd memory
If `memio->memory` is freed, then there is a double-free error since that pointer was either already freed in the realloc call, or it is the same pointer as newmen and should not be freed.   The documentation of realloc(3) states:
```
If the area pointed to was moved, a free(ptr) is done.
```

I'm not sure why I haven't hit this before, but I had a couple of my tests start throwing `double-free` errors and valgrind confirmed that the pointer had already been freed at the point of the realloc call.
2018-11-20 15:28:01 -07:00
..
attr.m4 This completes (for now) the refactoring of libsrc4. 2018-03-16 11:46:18 -06:00
CMakeLists.txt Merge branch 'master' into inmem2.dmh 2018-05-16 14:24:19 -06:00
depend moving to trunk subdir 2010-06-03 13:24:43 +00:00
dim.c This completes (for now) the refactoring of libsrc4. 2018-03-16 11:46:18 -06:00
ffio.c Merged master, DAP4 support into branch. 2017-04-19 09:29:35 -06:00
lookup3.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
Makefile.am Fix https://github.com/Unidata/netcdf-c/issues/963 2018-05-11 15:30:19 -06:00
memio.c Eliminate double-free in realloc'd memory 2018-11-20 15:28:01 -07:00
mmapio.c Revert/Improve nc_create + NC_DISKLESS behavior 2018-10-10 13:32:17 -06:00
nc3dispatch.c a clean commit for #383 2017-12-20 20:53:30 -06:00
nc3internal.c Ignore flags NC_MPIIO and NC_MPIPOSIX. 2018-09-22 20:22:34 -05:00
ncFile.c - Fix NCF-158 to modify ncgen flag defaults. 2012-03-14 23:26:48 +00:00
ncio.c Revert/Improve nc_create + NC_DISKLESS behavior 2018-10-10 13:32:17 -06:00
ncio.h The original mem branch somehow got 2015-05-28 15:10:10 -06:00
ncstdio.c - Fix NCF-158 to modify ncgen flag defaults. 2012-03-14 23:26:48 +00:00
ncstdio.h Fix https://github.com/Unidata/netcdf-c/issues/963 2018-05-11 15:30:19 -06:00
ncx_cray.c include config.h the way suggested by autoconf 2017-03-11 13:03:17 -06:00
ncx.h Fix build on pre-C99 compilers 2017-11-26 01:47:54 +05:30
ncx.m4 re: github issues 2018-10-30 20:48:12 -06:00
posixio.c Follow-up trivial typos 2018-04-26 23:04:01 -04:00
pstdint.h Fix common typos 2015-08-20 11:42:05 +02:00
putget.m4 Promote NC_var member len from size_t to long long to fix some problems of large-variable tests on 320bit platforms. 2018-06-15 15:08:05 -05:00
t_ncio.c Merged master, DAP4 support into branch. 2017-04-19 09:29:35 -06:00
t_ncio.in moving to trunk subdir 2010-06-03 13:24:43 +00:00
t_ncxx.m4 include config.h the way suggested by autoconf 2017-03-11 13:03:17 -06:00
test_nc.sav moving to trunk subdir 2010-06-03 13:24:43 +00:00
v1hpg.c Promote NC_var member len from size_t to long long to fix some problems of large-variable tests on 320bit platforms. 2018-06-15 15:08:05 -05:00
var.c another typecast missed 2018-06-17 13:16:09 -05:00
winceio.c Merged master, DAP4 support into branch. 2017-04-19 09:29:35 -06:00
XGetopt.c Merge from latest netcdf-cmake branch. 2012-12-05 18:35:42 +00:00