filter-dialog: fix use-after-free
filter-dialog: fix memory leak