Skip to content

Commit

Permalink
Fix #26
Browse files Browse the repository at this point in the history
  • Loading branch information
ofalk committed Jul 27, 2020
1 parent b81da65 commit 9774f23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ void get_cmdln_options(int argc, char *argv[]) {
pwd_entry=getpwuid(getuid());
if (pwd_entry!=NULL) {
str=(char*)malloc(strlen(pwd_entry->pw_dir)+14);
if(!str) {
printf("Fatal: failed to allocate %zu bytes.\n", strlen(pwd_entry->pw_dir)+14);
exit(EXIT_FAILURE);
}
snprintf(str,strlen(pwd_entry->pw_dir)+14,"%s/.bwm-ng.conf",pwd_entry->pw_dir);
read_config(str);
free(str);
Expand Down

0 comments on commit 9774f23

Please sign in to comment.