summaryrefslogtreecommitdiff
path: root/src/import/pull-dkr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/pull-dkr.c')
-rw-r--r--src/import/pull-dkr.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/import/pull-dkr.c b/src/import/pull-dkr.c
index 67ca1ce8e4..0dab184af1 100644
--- a/src/import/pull-dkr.c
+++ b/src/import/pull-dkr.c
@@ -592,8 +592,7 @@ static int dkr_pull_pull_layer_v2(DkrPull *i) {
i->current_ancestry++;
- free(path);
- path = NULL;
+ path = mfree(path);
}
log_info("Pulling layer %s...", layer);
@@ -652,8 +651,7 @@ static int dkr_pull_pull_layer(DkrPull *i) {
i->current_ancestry++;
- free(path);
- path = NULL;
+ path = mfree(path);
}
log_info("Pulling layer %s...", layer);
@@ -721,7 +719,7 @@ static int dkr_pull_job_on_header(PullJob *j, const char *header, size_t sz) {
return log_oom();
STRV_FOREACH(k, l) {
- if (!hostname_is_valid(*k)) {
+ if (!hostname_is_valid(*k, false)) {
log_error("Registry hostname is not valid.");
strv_free(l);
return -EBADMSG;
@@ -1213,10 +1211,8 @@ static void dkr_pull_job_on_finished(PullJob *j) {
log_info("Completed writing to layer %s.", i->final_path);
i->layer_job = pull_job_unref(i->layer_job);
- free(i->temp_path);
- i->temp_path = NULL;
- free(i->final_path);
- i->final_path = NULL;
+ i->temp_path = mfree(i->temp_path);
+ i->final_path = mfree(i->final_path);
i->current_ancestry ++;
r = dkr_pull_pull_layer(i);