Skip to content
Snippets Groups Projects
Commit 4a4e9ddd authored by Bertrand Bellenot's avatar Bertrand Bellenot
Browse files

Fix coverity reports #42884 & #42885

git-svn-id: http://root.cern.ch/svn/root/trunk@43365 27541ba8-7e3a-0410-8455-c3a389f83636
parent 8f81d417
No related branches found
No related tags found
No related merge requests found
......@@ -225,7 +225,7 @@ TGFSComboBox::TGFSComboBox(const TGWindow *parent, Int_t id, UInt_t options,
#ifndef ROOTPREFIX
const char *rootsys = gSystem->Getenv("ROOTSYS");
char *rootSys = (char *)calloc(strlen(rootsys)+1, sizeof(char));
sprintf(rootSys, "%s/", rootsys);
if (rootSys) snprintf(rootSys, strlen(rootsys)+1, "%s/", rootsys);
#else
// const char *rootSys = ROOTPREFIX;
#endif
......@@ -404,7 +404,7 @@ TGFSComboBox::TGFSComboBox(const TGWindow *parent, Int_t id, UInt_t options,
}
}
SetWindowName();
free(rootSys);
if (rootSys) free(rootSys);
}
//______________________________________________________________________________
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment