hmp: Call visit_end_struct() after visit_start_struct() succeeds
commitf9f3a5ecde4cb636d8eb43edc0d097bd364ffe75
authorMarkus Armbruster <armbru@redhat.com>
Wed, 7 May 2014 07:53:51 +0000 (7 09:53 +0200)
committerLuiz Capitulino <lcapitulino@redhat.com>
Thu, 15 May 2014 18:00:46 +0000 (15 14:00 -0400)
treee9c8956d719caa9e080adc76423f36200ed42c3c
parentbe3c771796cb5ca4e7de2e04ed3cd2e3b6b76185
hmp: Call visit_end_struct() after visit_start_struct() succeeds

When visit_start_struct() succeeds, visit_end_struct() must be called.
hmp_object_add() doesn't when a member visit fails.  As far as I can
tell, the opts visitor copes okay with the misuse.  Fix it anyway.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
hmp.c