]> asedeno.scripts.mit.edu Git - linux.git/commit
net: ibm: fix possible object reference leak
authorWen Yang <wen.yang99@zte.com.cn>
Fri, 22 Mar 2019 03:04:08 +0000 (11:04 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Mar 2019 01:21:24 +0000 (21:21 -0400)
commitbe693df3cf9dd113ff1d2c0d8150199efdba37f6
treede661513d01c85e448bcf06714b9778e60903eac
parentfa3a419d2f674b431d38748cb58fb7da17ee8949
net: ibm: fix possible object reference leak

The call to ehea_get_eth_dn returns a node pointer with refcount
incremented thus it must be explicitly decremented after the last
usage.

Detected by coccinelle with the following warnings:
./drivers/net/ethernet/ibm/ehea/ehea_main.c:3163:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 3154, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Douglas Miller <dougmill@linux.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ehea/ehea_main.c