dthelp: coverity fixes
This commit is contained in:
@@ -544,6 +544,8 @@ void srefout(M_NOPAR)
|
||||
fputs(ndif, dtd) ;
|
||||
}
|
||||
SUBONE
|
||||
|
||||
free(mapbysref);
|
||||
}
|
||||
|
||||
/* Output one element block in a template */
|
||||
|
||||
@@ -681,11 +681,11 @@ static char ident6[]="@(#) (c) Copyright 1993, 1994 Unix System Labs, Inc., a su
|
||||
thisnodelevel = 2;
|
||||
sprintf(id, "%s%s", sdlReservedName, glossary_string);
|
||||
mb_starthelpnode("_GLOSSARY", id, thisnodelevel);
|
||||
strcpy(chapstring, string) ;
|
||||
if (strlen(chapstring) + 1 > sizeof(chapstring)) {
|
||||
if (strlen(string) + 1 > sizeof(chapstring)) {
|
||||
m_error("Program error: exceeded chapstring") ;
|
||||
m_exit(TRUE) ;
|
||||
}
|
||||
sprintf(chapstring, sizeof(chapstring), "%s", string) ;
|
||||
fputs("\nGlossary\n", stderr) ;
|
||||
glossary = TRUE ;
|
||||
fprintf(outfile, "<HEAD SSI=\"CHAPHEAD\">%s</HEAD>\n", string);
|
||||
|
||||
@@ -424,8 +424,13 @@ 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))
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user