From: Johannes Berg Date: Fri, 23 Jan 2015 10:10:12 +0000 (+0100) Subject: nl80211: fix per-station group key get/del and memory leak X-Git-Tag: fixes-v4.0-rc1~235^2~9^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=0fa7b39131576dd1baa6ca17fca53c65d7f62249 nl80211: fix per-station group key get/del and memory leak In case userspace attempts to obtain key information for or delete a unicast key, this is currently erroneously rejected unless the driver sets the WIPHY_FLAG_IBSS_RSN flag. Apparently enough drivers do so it was never noticed. Fix that, and while at it fix a potential memory leak: the error path in the get_key() function was placed after allocating a message but didn't free it - move it to a better place. Luckily admin permissions are needed to call this operation. Cc: stable@vger.kernel.org Fixes: e31b82136d1ad ("cfg80211/mac80211: allow per-station GTKs") Signed-off-by: Johannes Berg --- Reading git-diff-tree failed