diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-02-20 19:21:34 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-02-20 19:21:34 +0000 |
| commit | 54fbfb6405f582fc6138f5c28a92e751e33ba687 (patch) | |
| tree | 6953d37dc8921022c59deb2907b7e69a500ed4db /client.c | |
| parent | doc: foot.5: login-shell: add default value ('no') (diff) | |
client: make sure 'cwd' is in scope of all goto's
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -115,6 +115,9 @@ main(int argc, char *const *argv) log_init(log_colorize, false, LOG_FACILITY_USER, LOG_CLASS_WARNING); + /* malloc:ed and needs to be in scope of all goto's */ + char *cwd = NULL; + int fd = socket(AF_UNIX, SOCK_STREAM, 0); if (fd == -1) { LOG_ERRNO("failed to create socket"); @@ -151,7 +154,6 @@ main(int argc, char *const *argv) } } - char *cwd = NULL; { errno = 0; size_t buf_len = 1024; |
