macsec: fix memory leaks around rx_handler (un)registration
authorSabrina Dubroca <sd@queasysnail.net>
Fri, 22 Apr 2016 09:28:06 +0000 (11:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Apr 2016 18:31:58 +0000 (14:31 -0400)
commit960d5848dbf1245cc3a310109897937207411c0c
treef9a3cbd70f51112658544422e2783ab928dd112a
parent96cfc5052c5d434563873caa7707b32b9e389b16
macsec: fix memory leaks around rx_handler (un)registration

We leak a struct macsec_rxh_data when we unregister the rx_handler in
macsec_dellink.
We also leak a struct macsec_rxh_data in register_macsec_dev if we fail
to register the rx_handler.

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