Merge pull request #117 from twsearle/patch-1

Resolve bad delete #98
This commit is contained in:
Ward Fisher 2021-11-29 16:04:16 -07:00 committed by GitHub
commit 754975130c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ string NcGroup::getName(bool fullName) const {
char* charName= new char[lenp+1]; char* charName= new char[lenp+1];
ncCheck(nc_inq_grpname_full(myId,&lenp,charName),__FILE__,__LINE__); ncCheck(nc_inq_grpname_full(myId,&lenp,charName),__FILE__,__LINE__);
groupName = charName; groupName = charName;
delete charName; delete[] charName;
} }
else { else {
// return the (local) name of this group. // return the (local) name of this group.