lib/igt_core: Handle glib errors correctly to avoid stderr spew

This adds the required error clean/free calls after calling
configuration parsing functions. In addition to properly handling memory,
this avoids glib spewing out error messages on stderr, which breaks the
whole CI with this message:

    GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
    This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
    The overwriting error message was: Key file does not have group ?DUT?

Fixes: ee31e0b5 ("Introduce common frame dumping configuration...")

Cc: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Cc: Lyude <lyude@redhat.com>
Cc: Martin Peres <martin.peres@linux.intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
1 file changed