summaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2024-02-23 01:05:04 +0000
committerAndrew Clayton <a.clayton@nginx.com>2024-03-05 23:09:35 +0000
commitc2f7f2964c9394643b69076ab8f0df490b000f45 (patch)
treec83a6413513a99ee5c9d251f2188364574585327 /.github
parent353d2d055798f7d1625c549a27062a6ca3a415db (diff)
downloadunit-c2f7f2964c9394643b69076ab8f0df490b000f45.tar.gz
unit-c2f7f2964c9394643b69076ab8f0df490b000f45.tar.bz2
Avoid potential NULL pointer dereference in nxt_router_temp_conf()
In nxt_router_temp_conf() we have rtcf = nxt_mp_zget(mp, sizeof(nxt_router_conf_t)); if (nxt_slow_path(rtcf == NULL)) { goto fail; } If rtcf is NULL then we do fail: if (rtcf->tstr_state != NULL) { nxt_tstr_state_release(rtcf->tstr_state); } In which case we will dereference the NULL pointer rtcf. This patch re-works the goto labels to make them more specific to their intended purpose and ensures we are freeing things which have been allocated. This was found by the clang static analyser. Reviewed-by: Zhidao Hong <z.hong@f5.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions