From ea04003657cc06ee69639aaede24b4c74071946c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 20 Apr 2024 23:13:12 +0200 Subject: [PATCH] luci-mod-network: fix potential null dereference on deleting VLANs Fixes: #7074 Fixes: 61cef9baad ("luci-mod-network: don't trigger uci save on removing bridge vlans") Signed-off-by: Jo-Philipp Wich --- .../htdocs/luci-static/resources/tools/network.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js index 40ab9637b4..09447cdf2b 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js @@ -921,7 +921,7 @@ return baseclass.extend({ ss.handleRemove = function(section_id) { this.map.data.remove('network', section_id); - s.map.addedVLANs = s.map.addedVLANs.filter(function(sid) { + s.map.addedVLANs = (s.map.addedVLANs || []).filter(function(sid) { return sid != section_id; }); -- 2.30.2