Repository navigation
Commit 8de7fb3
tipc: fix a memory leak in tipc_nl_node_get_link()
[ Upstream commit 59b3661 ]
When tipc_node_find_by_name() fails, the nlmsg is not
freed.
While on it, switch to a goto label to properly
free it.
Fixes: be9c086715c ("tipc: narrow down exposure of struct tipc_node")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent a940c19 commit 8de7fb3
1 file changed
Lines changed: 14 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1848 | 1848 | | |
1849 | 1849 | | |
1850 | 1850 | | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
| 1851 | + | |
| 1852 | + | |
1855 | 1853 | | |
1856 | 1854 | | |
1857 | 1855 | | |
1858 | 1856 | | |
1859 | 1857 | | |
1860 | 1858 | | |
1861 | | - | |
1862 | | - | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
1863 | 1863 | | |
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
1867 | 1867 | | |
1868 | | - | |
1869 | | - | |
| 1868 | + | |
| 1869 | + | |
1870 | 1870 | | |
1871 | 1871 | | |
1872 | 1872 | | |
1873 | 1873 | | |
1874 | | - | |
1875 | | - | |
1876 | | - | |
1877 | | - | |
| 1874 | + | |
| 1875 | + | |
1878 | 1876 | | |
1879 | 1877 | | |
1880 | 1878 | | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
1881 | 1883 | | |
1882 | 1884 | | |
1883 | 1885 | | |
| |||
0 commit comments