Repository navigation
Commit 59b3661
tipc: fix a memory leak in tipc_nl_node_get_link()
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>1 parent 749439b commit 59b3661
1 file changed
Lines changed: 14 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1880 | 1880 | | |
1881 | 1881 | | |
1882 | 1882 | | |
1883 | | - | |
1884 | | - | |
1885 | | - | |
1886 | | - | |
| 1883 | + | |
| 1884 | + | |
1887 | 1885 | | |
1888 | 1886 | | |
1889 | 1887 | | |
1890 | 1888 | | |
1891 | 1889 | | |
1892 | 1890 | | |
1893 | | - | |
1894 | | - | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
1895 | 1895 | | |
1896 | 1896 | | |
1897 | 1897 | | |
1898 | 1898 | | |
1899 | 1899 | | |
1900 | | - | |
1901 | | - | |
| 1900 | + | |
| 1901 | + | |
1902 | 1902 | | |
1903 | 1903 | | |
1904 | 1904 | | |
1905 | 1905 | | |
1906 | | - | |
1907 | | - | |
1908 | | - | |
1909 | | - | |
| 1906 | + | |
| 1907 | + | |
1910 | 1908 | | |
1911 | 1909 | | |
1912 | 1910 | | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
1913 | 1915 | | |
1914 | 1916 | | |
1915 | 1917 | | |
| |||
0 commit comments