1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

- Replaced all free() with wfree() where appropriate

- Fixed some memory leaks
This commit is contained in:
dan
2000-10-31 14:57:22 +00:00
parent 581ab58f70
commit 497e34b6b8
72 changed files with 545 additions and 539 deletions

View File

@@ -293,9 +293,9 @@ wTextDestroy( WTextInput *wtext )
XFreeGC( dpy, wtext->gc );
XFreeGC( dpy, wtext->regGC );
XFreeGC( dpy, wtext->invGC );
free( wtext->text.txt );
wfree( wtext->text.txt );
wCoreDestroy( wtext->core );
free( wtext );
wfree( wtext );
LEAVE("wTextDestroy");
}
@@ -444,7 +444,7 @@ wTextPutText( WTextInput *wtext, char *txt )
/* no memory leaks! free the old txt */
if( wtext->text.txt != NULL )
free( wtext->text.txt );
wfree( wtext->text.txt );
wtext->text.txt = (char *)wmalloc((length+1)*sizeof(char));
strcpy(wtext->text.txt, txt );
@@ -508,7 +508,7 @@ textInsert( WTextInput *wtext, char *txt )
wtext->text.startPos = sp+txtLen;
wtext->text.endPos = sp+txtLen;
free(wtext->text.txt);
wfree(wtext->text.txt);
wtext->text.txt = newTxt;
wtext->text.length = newLen-1;
}