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
Fixes: f8a9574f7e
(cherry picked from commit f55a272ade)
This commit is contained in:
Thomas Haller 2015-05-07 11:10:34 +02:00
parent 5a81162c43
commit 4609138e3e

View file

@ -3158,7 +3158,7 @@ infiniband_partition_add (NMPlatform *platform, int parent, int p_key, NMPlatfor
if (success) {
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);
success = refresh_object (platform, (struct nl_object *) rtnllink, FALSE, NM_PLATFORM_REASON_INTERNAL);