Re: [PATCH] json: Fix a memleak in parse_pair()

2020-11-13 Thread Alex Chen
On 2020/11/12 14:37, Markus Armbruster wrote: > Alex Chen writes: > >> In qobject_type(), NULL is returned when the 'QObject' returned from >> parse_value() is not of QString type, >> and this 'QObject' memory will leaked. >> So we need to first check whether the 'QObject' returned from

Re: [PATCH] json: Fix a memleak in parse_pair()

2020-11-11 Thread Markus Armbruster
Alex Chen writes: > In qobject_type(), NULL is returned when the 'QObject' returned from > parse_value() is not of QString type, > and this 'QObject' memory will leaked. > So we need to first check whether the 'QObject' returned from parse_value() > is of QString type, > and if not, we free

[PATCH] json: Fix a memleak in parse_pair()

2020-11-11 Thread Alex Chen
In qobject_type(), NULL is returned when the 'QObject' returned from parse_value() is not of QString type, and this 'QObject' memory will leaked. So we need to first check whether the 'QObject' returned from parse_value() is of QString type, and if not, we free 'QObject' memory and return an