[gvfs] admin: Fix minor memory leak



commit 04c44b91ea6fbadc384070085dc5dfa22710b5c8
Author: Ondrej Holy <oholy redhat com>
Date:   Tue Apr 30 10:32:30 2019 +0200

    admin: Fix minor memory leak
    
    GOptionContext is not released after `g_option_context_new ()` call.
    Let's use `g_option_context_free ()` to fix this minor memory leak.

 daemon/gvfsbackendadmin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/daemon/gvfsbackendadmin.c b/daemon/gvfsbackendadmin.c
index 0f849008..db76aff9 100644
--- a/daemon/gvfsbackendadmin.c
+++ b/daemon/gvfsbackendadmin.c
@@ -968,7 +968,7 @@ g_vfs_backend_admin_pre_setup (int *argc,
   g_option_context_set_ignore_unknown_options (context, TRUE);
   g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
   g_option_context_parse (context, argc, argv, &error);
-
+  g_option_context_free (context);
   if (error != NULL)
     g_error ("Can't parse arguments: %s", error->message);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]