all: fix wrong "gs_free GError *" declarations

This is a bug and leads either to a leak or a crash.

(cherry picked from commit 4a3ca711)
(cherry picked from commit 809d70ee)
16 jobs for nm-1-20 in 31 minutes and 16 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #1162357
checkpatch

00:02:00

manual #1162363
allowed to fail manual
t_centos:7.5.1804
manual #1162364
allowed to fail manual
t_centos:7.6.1810
manual #1162370
allowed to fail manual
t_debian:10
manual #1162369
allowed to fail manual
t_debian:9
manual #1162372
allowed to fail manual
t_debian:sid
manual #1162371
allowed to fail manual
t_debian:testing
manual #1162358
allowed to fail manual
t_fedora:28
manual #1162359
allowed to fail manual
t_fedora:29
passed #1162360
t_fedora:30

00:31:16

manual #1162361
allowed to fail manual
t_fedora:31
manual #1162362
allowed to fail manual
t_fedora:rawhide
manual #1162365
allowed to fail manual
t_ubuntu:16.04
manual #1162366
allowed to fail manual
t_ubuntu:18.04
manual #1162368
allowed to fail manual
t_ubuntu:devel
manual #1162367
allowed to fail manual
t_ubuntu:rolling