689d9bfcf6
according to the getline(3) documentation, the calling code needs to free the buffer even if getline fails. dmenu currently doesn't do that which results in a small leak in case of failure (e.g when piped /dev/null) $ ./dmenu < /dev/null ==8201==ERROR: LeakSanitizer: detected memory leaks Direct leak of 120 byte(s) in 1 object(s) allocated from: #0 0x7f6bf5785ef7 in malloc #1 0x7f6bf538ec84 in __getdelim #2 0x405d0c in readstdin dmenu.c:557 moving `line = NULL` inside the loop body wasn't strictly necessary, but IMO it makes it more apparent that `line` is getting cleared to NULL after each successful iteration. |
||
---|---|---|
arg.h | ||
config.def.h | ||
config.mk | ||
dmenu_path | ||
dmenu_run | ||
dmenu.1 | ||
dmenu.c | ||
drw.c | ||
drw.h | ||
LICENSE | ||
Makefile | ||
README | ||
stest.1 | ||
stest.c | ||
util.c | ||
util.h |
dmenu - dynamic menu ==================== dmenu is an efficient dynamic menu for X. Requirements ------------ In order to build dmenu you need the Xlib header files. Installation ------------ Edit config.mk to match your local setup (dmenu is installed into the /usr/local namespace by default). Afterwards enter the following command to build and install dmenu (if necessary as root): make clean install Running dmenu ------------- See the man page for details.