mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
Coverity: 1243512, Resource Leak.
This commit is contained in:
parent
1dae994c75
commit
d4c9482ab6
@ -90,6 +90,7 @@ NC_findtestserver(const char* path, const char** servers)
|
||||
if(stat == NC_NOERR)
|
||||
return url;
|
||||
}
|
||||
if(url) free(url);
|
||||
#endif
|
||||
#endif
|
||||
return NULL;
|
||||
@ -121,7 +122,7 @@ NC_testurl(const char* path)
|
||||
if(strcmp(tmpurl->protocol,protolist->protocol) == 0) {
|
||||
isurl=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ncurifree(tmpurl);
|
||||
return isurl;
|
||||
@ -163,10 +164,10 @@ NC_urlmodel(const char* path)
|
||||
free(tmpurl->protocol);
|
||||
tmpurl->protocol = strdup(protolist->substitute);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Force NC_DISPATCH_NC3 if necessary */
|
||||
if((model & NC_DISPATCH_NC4) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user