projects
/
platform
/
upstream
/
bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54d1fc6
)
profile: Fix memory leaks
author
Steve Grubb
<sgrubb@redhat.com>
Fri, 14 May 2021 14:00:09 +0000
(10:00 -0400)
committer
Ayush Garg
<ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000
(19:08 +0530)
g_new0 allocates memory that must be freed
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/audio/avrcp.c
patch
|
blob
|
history
diff --git
a/profiles/audio/avrcp.c
b/profiles/audio/avrcp.c
index
d854e7f
..
af8c987
100644
(file)
--- a/
profiles/audio/avrcp.c
+++ b/
profiles/audio/avrcp.c
@@
-3906,8
+3906,10
@@
static struct avrcp_player *create_ct_player(struct avrcp *session,
path = device_get_path(session->dev);
mp = media_player_controller_create(path, id);
- if (mp == NULL)
+ if (mp == NULL) {
+ g_free(player);
return NULL;
+ }
media_player_set_callbacks(mp, &ct_cbs, player);
player->user_data = mp;