monitor: fix undefined behavior

A recent static analysis check revealed a use-after-free condition in
json_parser.cpp. This fixes the undefined behavior.

Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Change-Id: I62b82b4982386d14e6ee7225b3ab6f3628e2a416
1 file changed