Do not double free expanded path in source-file, also remove some

unnecessary assignments.
This commit is contained in:
nicm
2021-08-22 13:48:29 +00:00
parent c0048d6d20
commit 72d905f32c
4 changed files with 4 additions and 6 deletions

4
file.c
View File

@ -558,7 +558,7 @@ file_write_open(struct client_files *files, struct tmuxpeer *peer,
log_debug("open write file %d %s", msg->stream, path);
find.stream = msg->stream;
if ((cf = RB_FIND(client_files, files, &find)) != NULL) {
if (RB_FIND(client_files, files, &find) != NULL) {
error = EBADF;
goto reply;
}
@ -717,7 +717,7 @@ file_read_open(struct client_files *files, struct tmuxpeer *peer,
log_debug("open read file %d %s", msg->stream, path);
find.stream = msg->stream;
if ((cf = RB_FIND(client_files, files, &find)) != NULL) {
if (RB_FIND(client_files, files, &find) != NULL) {
error = EBADF;
goto reply;
}