diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-08-09 08:54:39 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-08-09 08:54:39 +0000 |
| commit | 828a57c2011eb797a9a257d124d48c641b3cac89 (patch) | |
| tree | cb2539f90c8a1be1ae330c807997dfc2a98e9481 /client.c | |
| parent | changelog: add birger to 'contributers' for the upcoming release (diff) | |
| parent | Handle allocation failures explicitly in *_init() functions (diff) | |
Merge branch 'xmalloc-conversion' into master
Diffstat (limited to 'client.c')
| -rw-r--r-- | client.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -16,6 +16,7 @@ #define LOG_ENABLE_DBG 0 #include "log.h" #include "version.h" +#include "xmalloc.h" static volatile sig_atomic_t aborted = 0; @@ -201,7 +202,7 @@ main(int argc, char *const *argv) errno = 0; size_t buf_len = 1024; do { - cwd = realloc(cwd, buf_len); + cwd = xrealloc(cwd, buf_len); if (getcwd(cwd, buf_len) == NULL && errno != ERANGE) { LOG_ERRNO("failed to get current working directory"); goto err; |
