Update of /cvsroot/htoolkit/port/src/cbits/Win32
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26621/src/cbits/Win32
Modified Files:
Action.c
Log Message:
Fix memory leaks
Index: Action.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Action.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Action.c 16 May 2004 07:55:08 -0000 1.3
--- Action.c 16 May 2004 07:59:02 -0000 1.4
***************
*** 127,130 ****
--- 127,131 ----
void osSetActionTip(ActionHandle action, char *text)
{
+ free(action->tooltip);
action->tooltip = strdup(text);
}
***************
*** 137,140 ****
--- 138,142 ----
void osSetActionText(ActionHandle action, char *text)
{
+ free(action->title);
action->title = strdup(text);
}
***************
*** 149,152 ****
--- 151,155 ----
ToolHandle tool;
+ free(action->short_title);
action->short_title = (text && *text) ? strdup(text) : NULL;
|