macsec: don't put a NULL rxsa
authorSabrina Dubroca <sd@queasysnail.net>
Fri, 22 Apr 2016 09:28:03 +0000 (11:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Apr 2016 18:31:58 +0000 (14:31 -0400)
commit497f358aa4c0d99b75ec204407389920d5e33ec5
tree735124d9ec42abdf4776cc7d638bbe839ac9ac6e
parentc10c63ea739bce3b8a6ab85c7bb472d900c9b070
macsec: don't put a NULL rxsa

The "deliver:" path of macsec_handle_frame can be called with
rx_sa == NULL.  Check rx_sa != NULL before calling macsec_rxsa_put().

Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macsec.c