]> git.ipfire.org Git - thirdparty/hostap.git/commit
Fix memory leak in case allocation of token fails during JSON parsing
authorDavide Caratti <davide.caratti@gmail.com>
Sun, 24 Nov 2019 17:32:20 +0000 (18:32 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 21 Dec 2019 15:32:19 +0000 (17:32 +0200)
commit2ba6aa60458fc7cabe211c57c44f78d753f138ec
tree2fb6f8fa2081067caf0fcd81e448ad1f74ab70c1
parent84877f253d3dfff2ba70e8226b622ba2d088b054
Fix memory leak in case allocation of token fails during JSON parsing

On failure of json_alloc_token(), json_parse() can return without
freeing 'str' previously allocated by json_parse_string(). Fix this
adding proper call to os_free().

Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
src/utils/json.c