main: free error variable in main() at exit

Just try to free everything that was allocated. Don't leak
error in case of failure.

(cherry picked from commit 9e20ba6646)
This commit is contained in:
Thomas Haller 2018-06-21 08:03:44 +02:00
parent 141696b4e3
commit 5be0ad48e8

View file

@ -227,7 +227,7 @@ main (int argc, char *argv[])
gboolean success = FALSE;
NMManager *manager = NULL;
NMConfig *config;
GError *error = NULL;
gs_free_error GError *error = NULL;
gboolean wrote_pidfile = FALSE;
char *bad_domains = NULL;
NMConfigCmdLineOptions *config_cli;