Opened 7 years ago
Closed 7 years ago
#25 closed defect (fixed)
Potential memory leak
Reported by: | abwillis | Owned by: | Andreas Schnellbacher |
---|---|---|---|
Priority: | major | Milestone: | Unsorted |
Component: | Other | Version: | 1.18 |
Keywords: | Cc: |
Description
I ran cppcheck looking for possible uninitialized variables as I have seen crashes when doing a lot of scrolling. I did not find any but found a potential memory leak. I'll let you evaluate and decide if this is meaningful.
Index: src/gui/nepmdlib/nepmdlib.c =================================================================== --- src/gui/nepmdlib/nepmdlib.c (revision 2946) +++ src/gui/nepmdlib/nepmdlib.c (working copy) @@ -1032,7 +1032,7 @@ HCONFIG hconfig; CHAR szResult[ 20]; - PMODEINFO pmi = malloc( 1024); + PMODEINFO pmi = NULL; FUNCENTER; @@ -1076,6 +1076,8 @@ } while (FALSE); FUNCEXITRC; +if (pmi) + free( pmi); return _getRexxError( rc, pszBuffer, ulBuflen); }
Change History (6)
comment:2 by , 7 years ago
I used to use amouse but it has been many years ago now, once I started using Thinkpads I found the amouse driver did not work well with the Trackpoints so the crashes were with smouse.
comment:4 by , 7 years ago
In the meantime I remember that I'd dropped investigating the cause for scroll problems, when I found out that it behaves with the original EPM the same.
You can easily test this without uninstall by using the "Standard EPM" program object of NEPMD. nepmdlib.dll should not be loaded in that case, it's been loaded dynamically. (Having the original sources would be a huge improvement, not only for bugs like this.)
comment:5 by , 7 years ago
Owner: | set to |
---|---|
Status: | new → accepted |
Version: | 1.16 → 1.18 |
I've just checked that in: r2949. (Even I understand that there was a leak.) Thanks again.
comment:6 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Hy Andy, thanks for this.
I've seen that the first time when trying out to get a TP R51i to work stable and experimenting with ACPI drivers. I think that happens on SMP machines only. I always had AMouse active, because I prefer scroll messages over keyboard messages, as SMouse does it.
With SMouse, I've never seen that. Maybe AMouse and GRADD are involved, together with SMP. AMouse behaves also strange at scrolling other windows, e.g. folders or Mozilla. That's why I think there still exists a bug in it.
Do you have AMouse installed?