OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daba0e3
)
Fix memory leak when calling endpoint to select capabilities
author
Luiz Augusto von Dentz
<luiz.dentz-von@nokia.com>
Tue, 11 Jan 2011 14:42:27 +0000
(16:42 +0200)
committer
Johan Hedberg
<johan.hedberg@nokia.com>
Tue, 11 Jan 2011 15:19:09 +0000
(17:19 +0200)
When passing allocated memory to avdtp_service_cap_new it needs to be
freed since avdtp_service_cap_new copies the memory.
audio/a2dp.c
patch
|
blob
|
history
diff --git
a/audio/a2dp.c
b/audio/a2dp.c
index
c5da708
..
c1d82bb
100644
(file)
--- a/
audio/a2dp.c
+++ b/
audio/a2dp.c
@@
-1833,6
+1833,7
@@
static void select_cb(struct media_endpoint *endpoint, void *ret, int size,
sizeof(*cap) + size);
setup->caps = g_slist_append(setup->caps, media_codec);
+ g_free(cap);
done:
finalize_select(setup);