summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ipc.c b/src/ipc.c
index 2e92097..2af5dbf 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -9,6 +9,7 @@
#include <unistd.h>
#include "ipc.h"
#include "log.h"
+#include "xmalloc.h"
static int ipc_open(void);
static int ipc_send(int socket, struct json_object *request);
@@ -99,7 +100,7 @@ struct json_object *ipc_receive(int sock)
return NULL;
}
- char *buf = malloc(len + 1);
+ char *buf = xmalloc(len + 1);
if (recv(sock, buf, len, 0) != len) {
log_error("Error receiving response: %s\n", strerror(errno));
free(buf);