mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-17 16:50:18 +08:00
Fix potential null dereference
This commit is contained in:
parent
00a722b253
commit
e0792b41a0
@ -1139,6 +1139,7 @@ aws_load_credentials(NCglobalstate* gstate)
|
||||
/* add a "none" credentials */
|
||||
{
|
||||
struct AWSprofile* noprof = (struct AWSprofile*)calloc(1,sizeof(struct AWSprofile));
|
||||
if(noprof == NULL) {ret = NC_ENOMEM; goto done;}
|
||||
noprof->name = strdup("none");
|
||||
noprof->entries = nclistnew();
|
||||
nclistpush(profiles,noprof); noprof = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user