From 49c7405b6a88e56bb69e12189adb719927343e07 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Mon, 15 Nov 2021 19:37:48 +0000 Subject: 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 --- src/ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ipc.c') 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 #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); -- cgit v1.2.3