if (req->raw_args != NULL)
g_string_free(req->raw_args, TRUE);
+ while (req->cleanup != NULL) {
+ struct cleanup_list *c = req->cleanup;
+ req->cleanup = c->next;
+ c->func(c->arg);
+ g_free(c);
+ }
+
g_free(req);
}
if (req->raw_args != NULL)
g_string_free(req->raw_args, TRUE);
+ while (req->cleanup != NULL) {
+ struct cleanup_list *c = req->cleanup;
+ req->cleanup = c->next;
+ c->func(c->arg);
+ g_free(c);
+ }
+
g_free(req);
}