two small bugs!
Tony Balinski
ajbj at free.fr
Tue Jul 3 00:57:10 CEST 2007
Quoting Bert Wesarg <wesarg at informatik.uni-halle.de>:
> Hello,
>
> I think I found two small bugs/leaks/... whatever:
You did - well spotted!
> I) window.c:
>
> function deleteDocument() has obviously a NULL pointer dereference:
>
> static void deleteDocument(WindowInfo *window)
> {
> if (NULL != window) {
> return;
This was a mistaken change of test - it originally read "if (!window)"
and was changed to a more explicit test, but with the wrong operator.
I've updated this to "if (NULL == window)"
> II) window.c:
>
> function MoveDocumentDialog() has a memory leak for the case (!nList):
>
> /* stop here if there's no other window to move to */
> if (!nList) {
> XtFree((char *)list);
> return;
> }
>
> it misses the previously allocated shellWinList
I've added "XtFree((char *)shellWinList);" just before the return.
Thanks,
Tony
More information about the Develop
mailing list