diff options
author | Emeric Planet <emeric.planet@datadoghq.com> | 2017-12-11 11:38:31 +0100 |
---|---|---|
committer | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2017-12-11 11:38:31 +0100 |
commit | 53fb9b4f18cd9ee3a64be5084ccc76aeea279515 (patch) | |
tree | 7e87969fb73094b851f037c8fae3547ec579df46 /i3status.c | |
parent | c3424e10bee91a4e0f21e7f0b72975e938e3f501 (diff) |
Add IPv6 address when IPv4 isn't available (#247)
Diffstat (limited to 'i3status.c')
-rw-r--r-- | i3status.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |