1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dthelp/helpgen.c: coverity CID 175085; use after free

This commit is contained in:
Jon Trulson 2018-03-31 18:21:14 -06:00
parent ec93faffe7
commit 7752966865

View file

@ -384,7 +384,7 @@ CreateFamily (
char *title = NULL;
char *abstract = NULL;
char *list = NULL;
char *token;
char *token = NULL;
char *ptr;
char *bitmap = NULL;
char familyName [20]; /* FAMILY%d */
@ -501,8 +501,11 @@ CreateFamily (
CreateVolumeLink (canvas,out_topic, token) == 0)
count++;
if (token && *token != '\0' && *token != '\n')
if (token)
{
free ((void *) token);
token = NULL;
}
} while (list && *list != '\0');
@ -580,7 +583,6 @@ CreateFamily (
XrmDestroyDatabase (db);
}
free (token);
return result;
}