mirror of
https://github.com/tmux/tmux.git
synced 2025-09-06 08:57:06 +00:00
Merge branch 'obsd-master'
This commit is contained in:
5
file.c
5
file.c
@ -361,7 +361,7 @@ file_read(struct client *c, const char *path, client_file_cb cb, void *cbdata)
|
||||
size_t msglen;
|
||||
int fd = -1;
|
||||
u_int stream = file_next_stream++;
|
||||
FILE *f;
|
||||
FILE *f = NULL;
|
||||
size_t size;
|
||||
char buffer[BUFSIZ];
|
||||
|
||||
@ -401,7 +401,6 @@ file_read(struct client *c, const char *path, client_file_cb cb, void *cbdata)
|
||||
cf->error = EIO;
|
||||
goto done;
|
||||
}
|
||||
fclose(f);
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -424,6 +423,8 @@ skip:
|
||||
return cf;
|
||||
|
||||
done:
|
||||
if (f != NULL)
|
||||
fclose(f);
|
||||
file_fire_done(cf);
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user