summaryrefslogtreecommitdiff
path: root/src/import
diff options
context:
space:
mode:
Diffstat (limited to 'src/import')
-rw-r--r--src/import/curl-util.c4
-rw-r--r--src/import/export-raw.c5
-rw-r--r--src/import/export-tar.c4
-rw-r--r--src/import/import-raw.c4
-rw-r--r--src/import/import-tar.c4
-rw-r--r--src/import/importd.c6
-rw-r--r--src/import/pull-job.c4
-rw-r--r--src/import/pull-raw.c4
-rw-r--r--src/import/pull-tar.c4
9 files changed, 11 insertions, 28 deletions
diff --git a/src/import/curl-util.c b/src/import/curl-util.c
index 6990c47f48..734e1560e6 100644
--- a/src/import/curl-util.c
+++ b/src/import/curl-util.c
@@ -235,9 +235,7 @@ CurlGlue *curl_glue_unref(CurlGlue *g) {
sd_event_source_unref(g->timer);
sd_event_unref(g->event);
- free(g);
-
- return NULL;
+ return mfree(g);
}
int curl_glue_new(CurlGlue **glue, sd_event *event) {
diff --git a/src/import/export-raw.c b/src/import/export-raw.c
index db06e11b87..a3dbce1954 100644
--- a/src/import/export-raw.c
+++ b/src/import/export-raw.c
@@ -34,6 +34,7 @@
#include "fd-util.h"
#include "fileio.h"
#include "import-common.h"
+#include "missing.h"
#include "ratelimit.h"
#include "string-util.h"
#include "util.h"
@@ -86,9 +87,7 @@ RawExport *raw_export_unref(RawExport *e) {
free(e->buffer);
free(e->path);
- free(e);
-
- return NULL;
+ return mfree(e);
}
int raw_export_new(
diff --git a/src/import/export-tar.c b/src/import/export-tar.c
index d79c27f2d0..3bb6027431 100644
--- a/src/import/export-tar.c
+++ b/src/import/export-tar.c
@@ -91,9 +91,7 @@ TarExport *tar_export_unref(TarExport *e) {
free(e->buffer);
free(e->path);
- free(e);
-
- return NULL;
+ return mfree(e);
}
int tar_export_new(
diff --git a/src/import/import-raw.c b/src/import/import-raw.c
index fd6b9f7703..29f3f896e5 100644
--- a/src/import/import-raw.c
+++ b/src/import/import-raw.c
@@ -100,9 +100,7 @@ RawImport* raw_import_unref(RawImport *i) {
free(i->final_path);
free(i->image_root);
free(i->local);
- free(i);
-
- return NULL;
+ return mfree(i);
}
int raw_import_new(
diff --git a/src/import/import-tar.c b/src/import/import-tar.c
index 8b81324fde..22f9b8c5ea 100644
--- a/src/import/import-tar.c
+++ b/src/import/import-tar.c
@@ -107,9 +107,7 @@ TarImport* tar_import_unref(TarImport *i) {
free(i->final_path);
free(i->image_root);
free(i->local);
- free(i);
-
- return NULL;
+ return mfree(i);
}
int tar_import_new(
diff --git a/src/import/importd.c b/src/import/importd.c
index 28b4302cb3..9d31a956a5 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -141,8 +141,7 @@ static Transfer *transfer_unref(Transfer *t) {
safe_close(t->stdin_fd);
safe_close(t->stdout_fd);
- free(t);
- return NULL;
+ return mfree(t);
}
DEFINE_TRIVIAL_CLEANUP_FUNC(Transfer*, transfer_unref);
@@ -548,8 +547,7 @@ static Manager *manager_unref(Manager *m) {
m->bus = sd_bus_flush_close_unref(m->bus);
sd_event_unref(m->event);
- free(m);
- return NULL;
+ return mfree(m);
}
DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_unref);
diff --git a/src/import/pull-job.c b/src/import/pull-job.c
index 6bcf35ef4e..e550df2c57 100644
--- a/src/import/pull-job.c
+++ b/src/import/pull-job.c
@@ -50,9 +50,7 @@ PullJob* pull_job_unref(PullJob *j) {
free(j->payload);
free(j->checksum);
- free(j);
-
- return NULL;
+ return mfree(j);
}
static void pull_job_finish(PullJob *j, int ret) {
diff --git a/src/import/pull-raw.c b/src/import/pull-raw.c
index 8993402821..0cf410a5d9 100644
--- a/src/import/pull-raw.c
+++ b/src/import/pull-raw.c
@@ -110,9 +110,7 @@ RawPull* raw_pull_unref(RawPull *i) {
free(i->settings_path);
free(i->image_root);
free(i->local);
- free(i);
-
- return NULL;
+ return mfree(i);
}
int raw_pull_new(
diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c
index 8c61c46f73..68e2397b02 100644
--- a/src/import/pull-tar.c
+++ b/src/import/pull-tar.c
@@ -114,9 +114,7 @@ TarPull* tar_pull_unref(TarPull *i) {
free(i->settings_path);
free(i->image_root);
free(i->local);
- free(i);
-
- return NULL;
+ return mfree(i);
}
int tar_pull_new(