dthelp: more coverity fixes

This commit is contained in:
Peter Howkins
2018-04-11 02:07:55 +01:00
parent f4e3cb8327
commit 10468068ac
9 changed files with 14 additions and 7 deletions

View File

@@ -424,8 +424,9 @@ if (loading) newdlm = (char **) calloc(trysize, sizeof(M_WCHAR *));
if (! newtransit || (loading && ! newdlm))
{
trysize = NUMDELIM + 1;
free(newtransit);
newtransit = (int *) calloc(NUMCON * trysize, sizeof(int));
if (loading) newdlm = (char **) calloc(trysize, sizeof(M_WCHAR *));
if (loading) { free(newdlm); newdlm = (char **) calloc(trysize, sizeof(M_WCHAR *)); }
}
if (! newtransit || (loading && ! newdlm))
{

View File

@@ -144,6 +144,7 @@ void copyfile(pfile1,pfile2)
ret = system(pcmd);
ret = snprintf(pcmd, slen, "touch %s",pfile2);
ret = system(pcmd);
free(pcmd);
}
int nextchar(file, data)