Re: [OPEN-ILS-DEV] osrf_json_parser.c: memory leak when handling error

2008-01-27 Thread Bill Erickson
Scott McKellar wrote: In _jsonInsertParserItem(), we receive a pointer to a jsonObject named newo. Normally, newo is incorporated into the object that the parser is building. Whoever receives the object built by the parser is responsible for freeing it. However: if the sub-object currently

[OPEN-ILS-DEV] osrf_json_xml.c: memory leak and apparent bug

2008-01-27 Thread Scott McKellar
At the end of startElementHandler(), there is a branch of code that runs when the name passed in is boolean. It constructs a jsonObject of type JSON_BOOL but doesn't do anything with it. The pointer goes out of scope and the memory leaks. As a result, this branch of logic has no effect at all,