Removed a potential double-free identified by static analysis.
@@ -1203,7 +1203,10 @@ NC3_open(const char * path, int ioflags,
* !_CRAYMPP, only pe 0 is valid
*/
if(basepe != 0) {
- if(nc3) free(nc3);
+ if(nc3) {
+ free(nc3);
+ nc3 = NULL;
+ }
status = NC_EINVAL;
goto unwind_alloc;
}
