From 72d905f32c53ea1304b4b3206383502a23cfc0fd Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 22 Aug 2021 13:48:29 +0000 Subject: Do not double free expanded path in source-file, also remove some unnecessary assignments. --- file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'file.c') 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; } -- cgit