Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(480076)

Issue 1381: opusrtp: don't leak fd, state_sync or stream_state on error

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 years, 6 months ago by tmatth
Modified:
2 years, 6 months ago
Reviewers:
derf
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/opusrtp.c View 6 chunks +23 lines, -10 lines 0 comments Download

Messages

Total messages: 3
tmatth
2 years, 6 months ago #1
derf
Again, r=me for fixing the problems. But what I actually meant by "a wrapper function" ...
2 years, 6 months ago #2
tmatth
2 years, 6 months ago #3
On 2016/06/14 08:40:51, derf wrote:
> Again, r=me for fixing the problems.
> 
> But what I actually meant by "a wrapper function" was something like an
> 
> int rtp_send_file_impl(..., int *fd, FILE **in, ogg_sync_state *oy,
> ogg_stream_state *os);
> 
> Then rtp_send_file() just calls rtp_send_file_impl(), and when it returns,
> cleans up all of the resources. That guarantees you never miss a cleanup on
> return (and never have a "goto fail" problem).

Ah yes, one of *those* wrapper functions...
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld