lib: Use more g_auto()

!101
2 jobs from master in 6 minutes and 24 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Source Check
passed #242859
eslint

00:00:24

 
  Build
passed #242860
flatpak

00:05:59