Merge pull request #10 from selsky/master

clang: Remove dead initialization
Merge pull request #11 from selsky/master

Make sure last_state_change is initialized with json data.
Move newfilt malloc to avoid possible memory leak.
Detected by clang's static analyzer.