aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/afm-main-plugin/afm-main-plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/afm-main-plugin/afm-main-plugin.c b/plugins/afm-main-plugin/afm-main-plugin.c
index c6408a51..8b26fe7e 100644
--- a/plugins/afm-main-plugin/afm-main-plugin.c
+++ b/plugins/afm-main-plugin/afm-main-plugin.c
@@ -62,6 +62,7 @@ static struct memo *make_memo(struct afb_req request, const char *method)
if (memo != NULL) {
memo->request = request;
memo->method = method;
+ afb_req_addref(request);
}
return memo;
}
@@ -109,6 +110,7 @@ static void embed_call_void_callback(int status, struct json_object *obj, struct
afb_req_success(memo->request, obj, NULL);
}
}
+ afb_req_unref(memo->request);
free(memo);
}
@@ -134,6 +136,7 @@ static void call_appid_callback(int status, struct json_object *obj, struct memo
obj = json_object_get(obj);
afb_req_success(memo->request, obj, NULL);
}
+ afb_req_unref(memo->request);
free(memo);
}