diff -pdru ratpoison/src/history.c ratpoison.build/src/history.c --- ratpoison/src/history.c 2013-08-07 12:08:11.160005043 -0300 +++ ratpoison.build/src/history.c 2013-08-07 13:47:38.988040803 -0300 @@ -201,6 +201,8 @@ history_load (void) /* defaults.history_size might be only set later */ history_add_upto (hist_COMMAND, line, INT_MAX); } + if (line) + free(line); if (ferror (f)) { PRINT_DEBUG (("ratpoison: error reading %s - %s\n", filename, strerror (errno))); fclose(f);