Fix memory leak

Closes https://github.com/mate-desktop/mate-panel/pull/244