If we free the message immediately, there's no reason to
trim it back to the previous size.
Done with spatch:
@@
identifier msg, hdr;
@@
-if (hdr)
- genlmsg_cancel(msg, hdr);
... when != msg;
nlmsg_free(msg);
@@
identifier msg, hdr;
@@
-genlmsg_cancel(msg, hdr);
... when != msg;
nlmsg_free(msg);
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
return genlmsg_reply(msg, info);
nla_put_failure:
return genlmsg_reply(msg, info);
nla_put_failure:
- genlmsg_cancel(msg, hdr);
out:
nlmsg_free(msg);
return -ENOBUFS;
out:
nlmsg_free(msg);
return -ENOBUFS;
nla_put_failure_rcu:
rcu_read_unlock();
nla_put_failure:
nla_put_failure_rcu:
rcu_read_unlock();
nla_put_failure:
- genlmsg_cancel(msg, hdr);
put_failure:
nlmsg_free(msg);
return -EMSGSIZE;
put_failure:
nlmsg_free(msg);
return -EMSGSIZE;
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_notify_new_peer_candidate);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_notify_new_peer_candidate);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_conn_failed);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_conn_failed);
return true;
nla_put_failure:
return true;
nla_put_failure:
- genlmsg_cancel(msg, hdr);
nlmsg_free(msg);
return true;
}
nlmsg_free(msg);
return true;
}
return genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid);
nla_put_failure:
return genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlportid);
nla_put_failure:
- genlmsg_cancel(msg, hdr);
nlmsg_free(msg);
return -ENOBUFS;
}
nlmsg_free(msg);
return -ENOBUFS;
}
- genlmsg_cancel(msg, hdr);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_mgmt_tx_status);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_mgmt_tx_status);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
- genlmsg_cancel(msg, hdr);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_probe_status);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_probe_status);
nla_put_failure:
spin_unlock_bh(&rdev->beacon_registrations_lock);
nla_put_failure:
spin_unlock_bh(&rdev->beacon_registrations_lock);
- if (hdr)
- genlmsg_cancel(msg, hdr);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_report_obss_beacon);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_report_obss_beacon);
- genlmsg_cancel(msg, hdr);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_tdls_oper_request);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_tdls_oper_request);
- if (hdr)
- genlmsg_cancel(msg, hdr);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_crit_proto_stopped);
nlmsg_free(msg);
}
EXPORT_SYMBOL(cfg80211_crit_proto_stopped);