1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00

systemctl: fix a leak

This commit is contained in:
Thomas Hindoe Paaboel Andersen 2014-12-04 00:14:37 +01:00
parent f08c4c08c7
commit 652212b0c2

View File

@ -5753,8 +5753,11 @@ static int create_edit_temp_file(const char *new_path, const char *original_path
return log_oom();
r = mkdir_parents(new_path, 0755);
if (r < 0)
return log_error_errno(r, "Failed to create directories for %s: %m", new_path);
if (r < 0) {
log_error_errno(r, "Failed to create directories for %s: %m", new_path);
free(t);
return r;
}
r = copy_file(original_path, t, 0, 0644);
if (r == -ENOENT) {