p2p: Free all p2p plugins data before calling their exit routines
authorSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Jun 2012 17:22:48 +0000 (19:22 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 28 Jun 2012 17:22:48 +0000 (19:22 +0200)
The exit routine will delete the hash tables that free_server_data() might
try to destroy as well, triggering a GLib warning.

plugins/p2p.c

index 4f77732..c324faf 100644 (file)
@@ -378,12 +378,12 @@ static void p2p_exit(void)
 {
        DBG("");
 
+       g_list_free_full(server_list, free_server_data);
+
        snep_exit();
        npp_exit();
        handover_exit();
 
-       g_list_free_full(server_list, free_server_data);
-
        near_device_driver_unregister(&p2p_driver);
 }