Commit 23ca244
Address PR review: free FFI result pointers + widen VPN guard
- Free the C string returned by clearTunnelCache/runURLTests/sendConfigRequest
in a finally block; toDartString() only converts, so these were leaking the
C.CString("ok") allocation on every call.
- Gate refresh-configuration on `!= VPNStatus.disconnected` so connecting,
disconnecting, missingPermission and error states are also blocked, since
clearing the tunnel cache requires the tunnel to be fully stopped.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e93da84 commit 23ca244
2 files changed
Lines changed: 23 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
166 | 170 | | |
167 | | - | |
| 171 | + | |
168 | 172 | | |
169 | 173 | | |
170 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1799 | 1799 | | |
1800 | 1800 | | |
1801 | 1801 | | |
1802 | | - | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
1803 | 1808 | | |
1804 | 1809 | | |
1805 | 1810 | | |
| |||
1813 | 1818 | | |
1814 | 1819 | | |
1815 | 1820 | | |
1816 | | - | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
1817 | 1827 | | |
1818 | 1828 | | |
1819 | 1829 | | |
| |||
1827 | 1837 | | |
1828 | 1838 | | |
1829 | 1839 | | |
1830 | | - | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
1831 | 1846 | | |
1832 | 1847 | | |
1833 | 1848 | | |
| |||
0 commit comments