git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
6e1a089
)
modules/luci-mod-failsafe: Fix nil file descriptor error
author
Ekaitz Zárraga
<redacted>
Mon, 14 Sep 2015 11:31:49 +0000
(13:31 +0200)
committer
Ekaitz Zárraga
<redacted>
Mon, 14 Sep 2015 12:05:02 +0000
(14:05 +0200)
Signed-off-by: Ekaitz Zárraga <redacted>
modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua
patch
|
blob
|
history
diff --git
a/modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua
b/modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua
index 6f78643018ccdc95daf28524ba39903bc6ed806e..60caadb4b1fc498163dbcb8325a28f3b619fc2a8 100644
(file)
--- a/
modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua
+++ b/
modules/luci-mod-failsafe/luasrc/controller/failsafe/failsafe.lua
@@
-84,11
+84,13
@@
function action_flashops()
fp = io.open(image_tmp, "w")
end
end
- if chunk then
- fp:write(chunk)
- end
- if eof then
- fp:close()
+ if fp then
+ if chunk then
+ fp:write(chunk)
+ end
+ if eof then
+ fp:close()
+ end
end
end
)
git clone https://git.99rst.org/PROJECT