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:
35ce247
)
dtcm: Coverity 88165
author
Peter Howkins
<flibble@users.sf.net>
Wed, 4 Jul 2018 22:23:32 +0000
(23:23 +0100)
committer
Peter Howkins
<flibble@users.sf.net>
Wed, 4 Jul 2018 22:23:32 +0000
(23:23 +0100)
cde/programs/dtcm/libDtCmP/cm_tty.c
patch
|
blob
|
history
diff --git
a/cde/programs/dtcm/libDtCmP/cm_tty.c
b/cde/programs/dtcm/libDtCmP/cm_tty.c
index e7897bca1694008b38128514511978f88936257d..77590ed36b98523763e0c4f07de9886f7ee8c41a 100644
(file)
--- a/
cde/programs/dtcm/libDtCmP/cm_tty.c
+++ b/
cde/programs/dtcm/libDtCmP/cm_tty.c
@@
-2186,10
+2186,12
@@
str_to_period(char *ps, CSA_sint32 *repeat_type, int *repeat_nth) {
unit++;
ps2 = cm_strdup(unit);
ptr = strchr(ps2, ' ');
- if (ptr != NULL)
+ if (ptr != NULL)
{
*ptr = '\0';
- else
+ } else {
+ free(ps2);
return;
+ }
ptr++;
while (*ptr == ' ')