From 5be0ad48e84ce0e4c9c3077d29116aab14d7073f Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 21 Jun 2018 08:03:44 +0200 Subject: [PATCH] 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 9e20ba6646634be373ed91136000abf687c9af57) --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index c1267b275d..5cb7e785bf 100644 --- a/src/main.c +++ b/src/main.c @@ -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;