Fix potential memory leak 22/25922/1 10.92.0 10.93.0 11.91.0 11.92.0 12.90.0 12.90.1 12.91.0 12.92.0 12.93.0 13.93.0 koi/10.92.0 koi/10.93.0 koi_10.92.0 koi_10.93.0 lamprey/11.91.0 lamprey/11.92.0 lamprey_11.91.0 lamprey_11.92.0 marlin/12.90.0 marlin/12.90.1 marlin/12.91.0 marlin/12.92.0 marlin/12.93.0 marlin_12.90.0 marlin_12.90.1 marlin_12.91.0 marlin_12.92.0 marlin_12.93.0 needlefish/13.93.0 needlefish_13.93.0
authorLi Xiaoming <lixm.fnst@cn.fujitsu.com>
Fri, 15 Jan 2021 11:16:47 +0000 (19:16 +0800)
committerLi Xiaoming <lixm.fnst@cn.fujitsu.com>
Fri, 15 Jan 2021 11:20:26 +0000 (19:20 +0800)
commit9f6da135fc36eea418ecc15f77f4f8ef0dea6e7b
tree16677878971255fa30fe0e005fcee1e245476c64
parentb836eb906165331584bef7a8eaaddf2ca3cc7530
Fix potential memory leak

It is better to init jresp as NULL, and allocate new memory when it is
used, this will avoid the memory leak if the function returns during the
process.

Bug-AGL: SPEC-3584

Change-Id: Icb1eae050294f4438ad89739e324c5483b6b3441
Signed-off-by: Li Xiaoming <lixm.fnst@cn.fujitsu.com>
binding/navigation-api.c