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:
Gerhard Sittig 2018-02-08 21:47:21 +01:00
parent d8fb599c67
commit 603643fa71
1 changed files with 1 additions and 1 deletions

View File

@ -271,8 +271,8 @@ static int reset(struct sr_input *in)
{ {
struct context *inc = in->priv; struct context *inc = in->priv;
cleanup(in);
inc->started = FALSE; inc->started = FALSE;
cleanup(in);
g_string_truncate(in->buf, 0); g_string_truncate(in->buf, 0);
return SR_OK; return SR_OK;