Opened 17 years ago
Closed 17 years ago
#5004 closed defect (fixed)
remove string leak in VideoOutputDirectfb::GetRefreshRate()
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | mythtv | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
When the env var FRAMEBUFFER
can't be found in the environ list the member function then does a strdup("/dev/fb0")
. This dynamically allocates a string that will have to be cleaned up later. This is never done, so this little bit of memory is leaked. Since getenv gives up a pointer from environ (that is a static, global list of strings) then it makes sense to just hand over a constant string at this point instead of a strdup of a constant string.
This defect was introduced in changeset:3720 from a patch given to the mythtv-dev list (at least four years ago).
Attachments (1)
Change History (3)
Changed 17 years ago by
Attachment: | libs_libmythtv_videoout_fb.cpp-remove-string-leak.patch added |
---|
comment:1 Changed 17 years ago by
Milestone: | unknown → 0.22 |
---|---|
Owner: | changed from Isaac Richards to danielk |
Status: | new → assigned |
Note: See
TracTickets for help on using
tickets.
removes strdup (and also an unneeded null check)