| Summary: | Possible memory leak in Windows mouse input handling | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Tim Angus <tim> |
| Component: | events | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | critical | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | x86 | ||
| OS: | Windows (All) | ||
Looked like this was fixed in r4105. |
Let me preface this report by saying I haven't actually tried running the code here and it's possible I'm just overlooking something (albeit something not obvious). If this is the case I apologise profusely in advance :). It looks to me like there is a pretty horrendous memory leak in the handling of WM_INPUT messages in WIN_WindowProc/SDL_win32events.c. lpb = SDL_malloc(size * sizeof(LPBYTE)); I can't see the companion SDL_free for this allocation. It is freed by something that the lpb/raw pointer is passed to? And if so is SDL_free used to free it? In any case doing a memory allocation for every mouse event is probably not best practice, regardless of whether it leaks or not.