summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authornicm <nicm>2021-08-22 13:48:29 +0000
committernicm <nicm>2021-08-22 13:48:29 +0000
commit72d905f32c53ea1304b4b3206383502a23cfc0fd (patch)
tree3604fd660df026d9bafc253115bd3b56fc8ab94a /file.c
parentc0048d6d20a056464a6b1b63e8bdc1793a29b029 (diff)
Do not double free expanded path in source-file, also remove some
unnecessary assignments.
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index e527f121..7b956120 100644
--- a/file.c
+++ b/file.c
@@ -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;
}