diff --git a/src/infobar.c b/src/infobar.c index 63c7cfc..8217f02 100644 --- a/src/infobar.c +++ b/src/infobar.c @@ -229,7 +229,6 @@ infobar_draw_statustext(int sc, char *str) draw_text(infobar[sc].bar->dr, (sgeo[sc].width - SHADH) - textw(buf), FHINFOBAR, col, 0, buf); - free(buf); buf = _strdup(strwc); ++i; } diff --git a/src/init.c b/src/init.c index ae58bb4..c3f2066 100644 --- a/src/init.c +++ b/src/init.c @@ -202,16 +202,18 @@ init_status(void) sprintf(status_path, "%s/"DEF_STATUS, getenv("HOME")); - if(!(fd = open(status_path, O_RDONLY))) + if(!(fd = open(status_path, O_RDONLY)) + || !fopen(status_path, "r")) { free(status_path); + estatus = False; return; } stat(status_path, &st); - if(st.st_mode & S_IXUSR) + if(st.st_size && st.st_mode & S_IXUSR) { estatus = True; system(status_path);