Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
mpegts mux dvb: fix the load sequence and possible memory leak
- Loading branch information
Showing
1 changed file
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c664af6There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the code in line 660 supposed to work? If
mpegts_mux_create0returns NULL then this is assigned tommand inside theifis then freed?Also I did not see any memory leak as
mpegts_mux_create0frees mm anyway in its single error path.However, maybe I misunderstood something...
c664af6There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could also argue that calloc return value is unchecked and dereferenced. I know that this means system is going to die via OOM killer anyway but still