input/raw_analog: silence "use after free" compiler warning
The cleanup() call will void the memory which 'inc' points to. Move the dereference before the release. This was reported by clang's scan-build.
This commit is contained in:
parent
d8fb599c67
commit
603643fa71
|
@ -271,8 +271,8 @@ static int reset(struct sr_input *in)
|
|||
{
|
||||
struct context *inc = in->priv;
|
||||
|
||||
cleanup(in);
|
||||
inc->started = FALSE;
|
||||
cleanup(in);
|
||||
g_string_truncate(in->buf, 0);
|
||||
|
||||
return SR_OK;
|
||||
|
|
Loading…
Reference in New Issue