don't leak memory

Closes https://github.com/mate-desktop/mate-power-manager/pull/115