platform: fix compiler warning about non-initialized pointer

When compiling with -fexceptions (as we build our RPM), we must
initialize all variables with a cleanup attribute.

Fixes: 29ccb8851c
This commit is contained in:
Thomas Haller
2015-05-07 11:10:34 +02:00
parent 6270db5f0b
commit f55a272ade

View File

@@ -3158,7 +3158,7 @@ infiniband_partition_add (NMPlatform *platform, int parent, int p_key, NMPlatfor
if (success) { if (success) {
gs_free char *ifname = g_strdup_printf ("%s.%04x", parent_name, p_key); gs_free char *ifname = g_strdup_printf ("%s.%04x", parent_name, p_key);
auto_nl_object struct rtnl_link *rtnllink; auto_nl_object struct rtnl_link *rtnllink = NULL;
rtnllink = (struct rtnl_link *) build_rtnl_link (0, ifname, NM_LINK_TYPE_INFINIBAND); rtnllink = (struct rtnl_link *) build_rtnl_link (0, ifname, NM_LINK_TYPE_INFINIBAND);
success = refresh_object (platform, (struct nl_object *) rtnllink, FALSE, NM_PLATFORM_REASON_INTERNAL); success = refresh_object (platform, (struct nl_object *) rtnllink, FALSE, NM_PLATFORM_REASON_INTERNAL);