summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2021-11-15 19:37:48 +0000
committerPhil Jones <philj56@gmail.com>2021-11-15 19:37:48 +0000
commit49c7405b6a88e56bb69e12189adb719927343e07 (patch)
tree72c7691e746563cc1396c5b555659c813572c12e /src/ipc.c
parent108df42e561b7e81ba09a8c278a562129e651bb6 (diff)
Multiple smaller changes.
- Remove the background image and libpng dependency - Add a prompt - Add xmalloc with out-of-memory handling - Add beginnings of a rofi-like run cache
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);