main: free error variable in main() at exit

Just try to free everything that was allocated. Don't leak
error in case of failure.
This commit is contained in:
Thomas Haller 2018-06-21 08:03:44 +02:00
parent 191c9c7f0d
commit 9e20ba6646

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;