diff -pdru ratpoison/src/hook.c ratpoison.build/src/hook.c --- ratpoison/src/hook.c 2013-08-07 12:08:11.161005020 -0300 +++ ratpoison.build/src/hook.c 2013-08-07 13:18:16.804773548 -0300 @@ -34,7 +34,10 @@ hook_add (struct list_head *hook, struct list_for_each_entry (cur, hook, node) { if (!strcmp (sbuf_get (cur), sbuf_get (s))) - return; + { + sbuf_free (s); + return; + } } /* It's not in the list, so add it. */