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:
e18054a
)
dtcm: Coverity 88858
author
Peter Howkins
<flibble@users.sf.net>
Wed, 4 Jul 2018 22:43:42 +0000
(23:43 +0100)
committer
Peter Howkins
<flibble@users.sf.net>
Wed, 4 Jul 2018 22:43:42 +0000
(23:43 +0100)
cde/programs/dtcm/dtcm/todo.c
patch
|
blob
|
history
diff --git
a/cde/programs/dtcm/dtcm/todo.c
b/cde/programs/dtcm/dtcm/todo.c
index 0cd3c346e4bab9c29073995f04f7d59eba2fefc8..ffda2397f8db2db10d820d9ae8fdba788f84b4bf 100644
(file)
--- a/
cde/programs/dtcm/dtcm/todo.c
+++ b/
cde/programs/dtcm/dtcm/todo.c
@@
-1982,12
+1982,15
@@
add_to_todo_list(CSA_entry_handle entry, ToDo *t) {
if (lines && lines->s) {
buf = (char *)ckalloc(cm_strlen(lines->s) + 1);
strcpy(buf, lines->s);
- destroy_lines(lines);
} else {
buf = (char *)ckalloc(1);
buf[0] = '\0';
}
+ if(lines) {
+ destroy_lines(lines);
+ }
+
str = XmStringCreateLocalized(buf);
XmListAddItem(t->todo_list, str, 0);
free_appt_struct(&appt);