mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
fix memory leak
This commit is contained in:
parent
b488c272d5
commit
8a5ae84dc6
@ -247,7 +247,9 @@ main(int argc, char **argv)
|
||||
if (!nerrs)
|
||||
printf("SUCCESS!!\n");
|
||||
|
||||
if(pfs->params) free(pfs->params);
|
||||
if(pfs && pfs->params) free(pfs->params);
|
||||
if(pfs) free(pfs);
|
||||
|
||||
return (nerrs > 0 ? 1 : 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user