Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
fc2f3250
"vscode:/vscode.git/clone" did not exist on "ddcbb628a18cbd6febc6c31e71de1a140239e8b4"
Commit
fc2f3250
authored
Jan 10, 2018
by
Arnim Läuger
Committed by
Marcel Stör
Jan 10, 2018
Browse files
add missing NULLification of serout.delay_table after luaM_freearray() (#2220)
parent
ceadd30b
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/gpio.c
View file @
fc2f3250
...
@@ -228,8 +228,10 @@ static const os_param_t TIMER_OWNER = 0x6770696f; // "gpio"
...
@@ -228,8 +228,10 @@ static const os_param_t TIMER_OWNER = 0x6770696f; // "gpio"
static
void
seroutasync_done
(
task_param_t
arg
)
static
void
seroutasync_done
(
task_param_t
arg
)
{
{
lua_State
*
L
=
lua_getstate
();
lua_State
*
L
=
lua_getstate
();
luaM_freearray
(
L
,
serout
.
delay_table
,
serout
.
tablelen
,
uint32
);
if
(
serout
.
delay_table
)
{
serout
.
delay_table
=
NULL
;
luaM_freearray
(
L
,
serout
.
delay_table
,
serout
.
tablelen
,
uint32
);
serout
.
delay_table
=
NULL
;
}
if
(
serout
.
lua_done_ref
!=
LUA_NOREF
)
{
if
(
serout
.
lua_done_ref
!=
LUA_NOREF
)
{
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
serout
.
lua_done_ref
);
lua_rawgeti
(
L
,
LUA_REGISTRYINDEX
,
serout
.
lua_done_ref
);
luaL_unref
(
L
,
LUA_REGISTRYINDEX
,
serout
.
lua_done_ref
);
luaL_unref
(
L
,
LUA_REGISTRYINDEX
,
serout
.
lua_done_ref
);
...
@@ -310,6 +312,7 @@ static int lgpio_serout( lua_State* L )
...
@@ -310,6 +312,7 @@ static int lgpio_serout( lua_State* L )
}
}
}
while
(
serout
.
repeats
--
);
}
while
(
serout
.
repeats
--
);
luaM_freearray
(
L
,
serout
.
delay_table
,
serout
.
tablelen
,
uint32
);
luaM_freearray
(
L
,
serout
.
delay_table
,
serout
.
tablelen
,
uint32
);
serout
.
delay_table
=
NULL
;
}
}
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment