summaryrefslogtreecommitdiffstats
path: root/binding/media-api.c
diff options
context:
space:
mode:
authorFarshid Monhaseri <monhaseri.f@gmail.com>2020-01-22 19:19:16 +0330
committerFarshid Monhaseri <monhaseri.f@gmail.com>2020-01-25 12:47:50 +0330
commit3137e9db2720dcd4229915eb85c3e9abca8f1ec3 (patch)
tree7adf81df04dae8cbd0b7221c8af2274aaf7a47e1 /binding/media-api.c
parent7051b6f8422fdb742bf70077eacfd1249ac21d21 (diff)
mediascanner: fix the service memory leakagesicefish_8.99.5icefish/8.99.58.99.5
Bug-AGL: SPEC-3103 - fix memory leakage in 'media_results_get' callback function which is called by 'media_result' verb. Set free-full the whole list with 'free_media_item' callback function(major leak). - fix memory leakage in 'MediaPlayerManagerInit' function, file object is not released(minor leak). - fix memory leakage in 'media_lightmediascanner_scan' function and avoid open sqlite3 connection and allocate whole sqlite resources again and again on every function execution (major leak). - fix memory leakage in 'on_interface_proxy_properties_changed' when iterating over 'changed_properties' and not release key & subValues. Signed-off-by: Farshid Monhaseri <monhaseri.f@gmail.com> Change-Id: I943a961b0c13be79c70c80e7a4f558958551f800
Diffstat (limited to 'binding/media-api.c')
-rw-r--r--binding/media-api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/binding/media-api.c b/binding/media-api.c
index 05fbba2..0365b49 100644
--- a/binding/media-api.c
+++ b/binding/media-api.c
@@ -245,7 +245,7 @@ static void media_results_get (afb_req_t request)
}
jresp = new_json_object_from_device(list);
- g_list_free(list);
+ g_list_free_full(list,free_media_item);
ListUnlock();
if (jresp == NULL) {