diff options
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/catalog.c | 3 | ||||
-rw-r--r-- | src/journal/coredumpctl.c | 3 | ||||
-rw-r--r-- | src/journal/journalctl.c | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/src/journal/catalog.c b/src/journal/catalog.c index 33b0539315..a3e51e2f52 100644 --- a/src/journal/catalog.c +++ b/src/journal/catalog.c @@ -263,8 +263,7 @@ int catalog_import_file(Hashmap *h, struct strbuf *sb, const char *path) { if (r < 0) return r; - free(lang); - lang = NULL; + lang = mfree(lang); } if (with_language) { diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c index fc49b2e174..098f62af50 100644 --- a/src/journal/coredumpctl.c +++ b/src/journal/coredumpctl.c @@ -587,8 +587,7 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) { if (filename && access(filename, R_OK) < 0) { log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING, "File %s is not readable: %m", filename); - free(filename); - filename = NULL; + filename = mfree(filename); } if (filename && !endswith(filename, ".xz") && !endswith(filename, ".lz4")) { diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 073cc77711..355c4f1ee3 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -1259,8 +1259,7 @@ static int add_units(sd_journal *j) { } } - strv_free(patterns); - patterns = NULL; + patterns = strv_free(patterns); STRV_FOREACH(i, arg_user_units) { _cleanup_free_ char *u = NULL; |