libnm: fix memleak in find_virtual_interface_name()

This commit is contained in:
Thomas Haller
2015-02-06 16:36:55 +01:00
parent fffd93b5c4
commit f1bfe459ee

View File

@@ -968,8 +968,9 @@ find_virtual_interface_name (GVariant *connection_dict)
/* All of the deprecated virtual interface name properties were named "interface-name". */
if (!g_variant_lookup (setting_dict, "interface-name", "&s", &interface_name))
return NULL;
interface_name = NULL;
g_variant_unref (setting_dict);
return interface_name;
}