return 0;
}
+static void pakfire_client_upload_free(struct pakfire_client_upload* upload);
+
static void pakfire_client_free(struct pakfire_client* self) {
+ struct pakfire_client_upload* upload = NULL;
+
if (self->auth.access_timer)
sd_event_source_unref(self->auth.access_timer);
if (self->auth.refresh_timer)
sd_event_source_unref(self->auth.refresh_timer);
+ // Free uploads
+ while (!STAILQ_EMPTY(&self->uploads)) {
+ upload = STAILQ_FIRST(&self->uploads);
+
+ // Free the upload
+ pakfire_client_upload_free(upload);
+ }
+
// Event Loop
if (self->loop)
sd_event_unref(self->loop);