fix small memleak in action()

This was introduced by a recent patch. Not present in any
released version.