Opened 5 years ago

Closed 5 years ago

#1772 closed defect (fixed)

Fix error handling in pjsua_create() and pjsua_init()

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-2.3
Component: pjsua-lib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Reported that application crashes on releasing its memory pool after pjsua_init returning error. After investigation, we found that pjsua_destroy() is automatically called by pjsua_init() upon failure, so calling any PJ API after that may lead to crash.

This ticket will fix the following issues:

  • pjsua_init() shouldn't call pjsua_destroy() upon failure
  • also pjsua_create() should reset all pjsua states (including pjlib's) upon failure.

Thanks Yeffry Zakizon for the report.

Change History (1)

comment:1 Changed 5 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed

In 4861:

Close #1772: Fixed error handling in pjsua_create() and pjsua_init().

Note: See TracTickets for help on using tickets.