fix memory leak on freeWorkset()

Add a TODO: discuss with Mike, don't free ws->input,
that should be handled with at user-land.