aboutsummaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2020-08-08 19:34:30 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2020-08-08 19:37:57 +0000
commit7a77958ba20c2b344be5e66e69e2f212a4bbf6b3 (patch)
treecdb8191177f5f9ca69ea7858f9543f36fcbcf616 /client.c
parentchangelog: add birger to 'contributers' for the upcoming release (diff)
Convert most dynamic allocations to use functions from xmalloc.h
Diffstat (limited to 'client.c')
-rw-r--r--client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/client.c b/client.c
index 69a91833..f8a07daa 100644
--- a/client.c
+++ b/client.c
@@ -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;