Re: [Qemu-devel] [PATCH v2 10/18] qjson: report an error if there are multiple results

2018-07-22 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Fri, Jul 20, 2018 at 10:49 AM, Markus Armbruster wrote: >> Marc-André Lureau writes: >> >>> qobject_from_jsonv() returns a single object. Let's make sure that >>> during parsing we don't leak an intermediary object. Instead of >>> returning the last object,

Re: [Qemu-devel] [PATCH v2 10/18] qjson: report an error if there are multiple results

2018-07-20 Thread Marc-André Lureau
Hi On Fri, Jul 20, 2018 at 10:49 AM, Markus Armbruster wrote: > Marc-André Lureau writes: > >> qobject_from_jsonv() returns a single object. Let's make sure that >> during parsing we don't leak an intermediary object. Instead of >> returning the last object, set a parsing error. >> >> Also, the

Re: [Qemu-devel] [PATCH v2 10/18] qjson: report an error if there are multiple results

2018-07-20 Thread Markus Armbruster
Marc-André Lureau writes: > qobject_from_jsonv() returns a single object. Let's make sure that > during parsing we don't leak an intermediary object. Instead of > returning the last object, set a parsing error. > > Also, the lexer/parser keeps consuming all the data. There might be an > error set

[Qemu-devel] [PATCH v2 10/18] qjson: report an error if there are multiple results

2018-07-19 Thread Marc-André Lureau
qobject_from_jsonv() returns a single object. Let's make sure that during parsing we don't leak an intermediary object. Instead of returning the last object, set a parsing error. Also, the lexer/parser keeps consuming all the data. There might be an error set earlier. Let's keep it and not call js