Signed-off-by: David Sterba <dsterba@suse.cz>
int dest_dir_fd;
int write_fd;
- char *write_path;
+ char write_path[PATH_MAX];
char *root_path;
char *dest_dir_path; /* relative to root_path */
strerror(-ret));
goto out;
}
- free(r->write_path);
- r->write_path = strdup(path);
+ strncpy_null(r->write_path, path);
out:
return ret;
}
free(r->root_path);
r->root_path = NULL;
- free(r->write_path);
- r->write_path = NULL;
free(r->full_subvol_path);
r->full_subvol_path = NULL;
r->dest_dir_path = NULL;