diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-10-25 13:25:41 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-10-25 13:25:41 +0000 |
commit | 2bb9cae4a1c2fa8398452c5c7032d77853238cd8 (patch) | |
tree | 1432a6da811f7f08c72ee9c95faab2ec27cb0817 /audio/avdtp.c | |
parent | 221a91a439f128912f6989d13ddf9926ad0a1572 (diff) |
Fix L2CAP socket leak
Diffstat (limited to 'audio/avdtp.c')
-rw-r--r-- | audio/avdtp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/audio/avdtp.c b/audio/avdtp.c index 1ce76bc4..00045820 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -561,6 +561,9 @@ static void stream_free(struct avdtp_stream *stream) if (stream->timer) g_source_remove(stream->timer); + if (stream->sock >= 0) + close(stream->sock); + if (stream->io) g_source_remove(stream->io); @@ -720,11 +723,6 @@ static void release_stream(struct avdtp_stream *stream, struct avdtp *session) { struct avdtp_local_sep *sep = stream->lsep; - if (stream->sock >= 0) - close(stream->sock); - if (stream->io) - g_source_remove(stream->io); - if (sep->cfm && sep->cfm->abort) sep->cfm->abort(session, sep, stream, NULL, sep->user_data); |