projects
/
oweals
/
cde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec93faf
)
dthelp/helpgen.c: coverity CID 175085; use after free
author
Jon Trulson
<jon@radscan.com>
Sun, 1 Apr 2018 00:21:14 +0000
(18:21 -0600)
committer
Jon Trulson
<jon@radscan.com>
Sun, 1 Apr 2018 00:21:14 +0000
(18:21 -0600)
cde/programs/dthelp/dthelpgen/helpgen.c
patch
|
blob
|
history
diff --git
a/cde/programs/dthelp/dthelpgen/helpgen.c
b/cde/programs/dthelp/dthelpgen/helpgen.c
index 69f2686437cd1559449410aa7a0a0867b5a306b3..1ce60bc36cb66f7536900f5b7b27ed6b4212b198 100644
(file)
--- a/
cde/programs/dthelp/dthelpgen/helpgen.c
+++ b/
cde/programs/dthelp/dthelpgen/helpgen.c
@@
-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');
@@
-579,8
+582,7
@@
CreateFamily (
}
XrmDestroyDatabase (db);
}
-
- free (token);
+
return result;
}