service: fix compilation with GLib 2.32

g_clear_pointer() is only available from GLib 2.34 and higher.

Regression was introduced in 627453c2dec8d5eb4fbc775b3d9afa7c25491350.