mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
Corrected resource leak, Coverity 1264412
This commit is contained in:
parent
f3b2deafa3
commit
59f8cf19f1
@ -191,6 +191,9 @@ ocopen(OCstate** statep, const char* url)
|
||||
#endif
|
||||
|
||||
if(statep) *statep = state;
|
||||
else {
|
||||
if(state != NULL) ocfree(state);
|
||||
}
|
||||
return OCTHROW(stat);
|
||||
|
||||
fail:
|
||||
|
Loading…
Reference in New Issue
Block a user