From f2f870f367162892c89ce72dced573f5a7ec63bf Mon Sep 17 00:00:00 2001 From: Apiote Date: Mon, 25 Nov 2019 13:58:16 +0100 Subject: [PATCH] set line NULL in dmenu mode Previously line was uninitialised which resulted in getline ending in segmentation fault. --- modes/dmenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modes/dmenu.c b/modes/dmenu.c index 6ddfaf5..49da9d4 100644 --- a/modes/dmenu.c +++ b/modes/dmenu.c @@ -34,7 +34,7 @@ void wofi_dmenu_init() { free(cache); - char* line; + char* line = NULL; size_t size = 0; while(getline(&line, &size, stdin) != -1) { char* lf = strchr(line, '\n');