From 53fb9b4f18cd9ee3a64be5084ccc76aeea279515 Mon Sep 17 00:00:00 2001 From: Emeric Planet Date: Mon, 11 Dec 2017 11:38:31 +0100 Subject: Add IPv6 address when IPv4 isn't available (#247) --- i3status.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'i3status.c') diff --git a/i3status.c b/i3status.c index 558f8ab..2cded06 100644 --- a/i3status.c +++ b/i3status.c @@ -111,6 +111,9 @@ static void *scalloc(size_t size) { } char *sstrdup(const char *str) { + if (str == NULL) { + return NULL; + } char *result = strdup(str); exit_if_null(result, "Error: out of memory (strdup())\n"); return result; -- cgit v1.2.3