aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-api-v3.c
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2018-07-25 14:13:36 +0200
committerJose Bollo <jose.bollo@iot.bzh>2018-07-25 15:12:48 +0200
commit9c2e6e45d4c9745c4702ac1992a0cb086e99fb0b (patch)
treeacfd70be619b6b7fe25dc9e6c5e66c137f3fc597 /src/afb-api-v3.c
parentf96bbb49cc9bcd81693300191cf7a01b879fd83d (diff)
Fix some more memory leaks
While making coverage test, few leaks appeared. This corrects the last discorvered ones. Change-Id: Id9e508bc9412072b628742971b02dd3d62799f3f Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-api-v3.c')
-rw-r--r--src/afb-api-v3.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/afb-api-v3.c b/src/afb-api-v3.c
index 1bda6b08..02853b12 100644
--- a/src/afb-api-v3.c
+++ b/src/afb-api-v3.c
@@ -239,6 +239,9 @@ void afb_api_v3_unref(struct afb_api_v3 *api)
{
if (api && !__atomic_sub_fetch(&api->refcount, 1, __ATOMIC_RELAXED)) {
afb_export_destroy(api->export);
+ while (api->count)
+ free(api->verbs[--api->count]);
+ free(api->verbs);
free(api);
}
}