-----Original Message-----
From: David Miller [mailto:davem@davemloft.net]
quoted
@@ -4477,6 +4551,22 @@ static int be_if_create(struct be_adapter
*adapter)
quoted
u32 cap_flags = be_if_cap_flags(adapter);
int status;
+ /* alloc required memory for other filtering fields */
+ adapter->pmac_id = kcalloc(be_max_uc(adapter),
+ sizeof(*adapter->pmac_id), GFP_KERNEL);
+ if (!adapter->pmac_id)
+ return -ENOMEM;
+
+ adapter->mc_list = kcalloc(be_max_mc(adapter),
+ sizeof(*adapter->mc_list), GFP_KERNEL);
+ if (!adapter->mc_list)
+ return -ENOMEM;
+
+ adapter->uc_list = kcalloc(be_max_uc(adapter),
+ sizeof(*adapter->uc_list), GFP_KERNEL);
+ if (!adapter->uc_list)
+ return -ENOMEM;
These error paths are leaking memory, please audit this in the rest of
your change as well.
David, thanks for catching this; will fix this (and others if any) and
send out a v2.