Fix a few memory leaks.

This commit is contained in:
nicm
2021-08-23 11:04:21 +00:00
parent 3ed37a2079
commit 4a753dbefc
5 changed files with 15 additions and 6 deletions

1
tmux.c
View File

@ -211,6 +211,7 @@ make_label(const char *label, char **cause)
free(paths);
xasprintf(&base, "%s/tmux-%ld", path, (long)uid);
free(path);
if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST) {
xasprintf(cause, "couldn't create directory %s (%s)", base,
strerror(errno));