1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-05 13:24:14 +01:00

Fixed mem leak in browser code.

This commit is contained in:
dan
2000-11-01 03:40:36 +00:00
parent 84ba62ba6b
commit d40425c388
2 changed files with 4 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ changes since wmaker 0.62.1:
- WMDestroyWidget() now calls WMUnmapWidget() first - WMDestroyWidget() now calls WMUnmapWidget() first
- added WMScrollerDidScrollNotification to scroller - added WMScrollerDidScrollNotification to scroller
- added WMGetScrollViewVisibleRect() - added WMGetScrollViewVisibleRect()
- fixed a mem leak in the browser code.
changes since wmaker 0.62.0: changes since wmaker 0.62.0:

View File

@@ -706,7 +706,7 @@ char*
WMSetBrowserPath(WMBrowser *bPtr, char *path) WMSetBrowserPath(WMBrowser *bPtr, char *path)
{ {
int i; int i;
char *str = wstrdup(path); char *str;
char *tmp, *retPtr = NULL; char *tmp, *retPtr = NULL;
int item; int item;
WMListItem *listItem; WMListItem *listItem;
@@ -722,6 +722,7 @@ WMSetBrowserPath(WMBrowser *bPtr, char *path)
WMSetListPosition(bPtr->columns[0], 0); WMSetListPosition(bPtr->columns[0], 0);
i = 0; i = 0;
str = wstrdup(path);
tmp = strtok(str, bPtr->pathSeparator); tmp = strtok(str, bPtr->pathSeparator);
while (tmp) { while (tmp) {
/* select it in the column */ /* select it in the column */
@@ -747,6 +748,7 @@ WMSetBrowserPath(WMBrowser *bPtr, char *path)
i++; i++;
} }
wfree(str); wfree(str);
for (i = bPtr->usedColumnCount - 1; for (i = bPtr->usedColumnCount - 1;