[OpenSIPS-Devel] [OpenSIPS/opensips] c976f5: dialog: Fix a race condition on mid-dlg Contact up...

Liviu Chircu noreply at github.com
Wed Jan 4 16:44:00 UTC 2023


  Branch: refs/heads/3.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: c976f558432ff207d672bfebb04dd7b8c6ef6b46
      https://github.com/OpenSIPS/opensips/commit/c976f558432ff207d672bfebb04dd7b8c6ef6b46
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2023-01-04 (Wed, 04 Jan 2023)

  Changed paths:
    M modules/dialog/dlg_handlers.c

  Log Message:
  -----------
  dialog: Fix a race condition on mid-dlg Contact updates

The "contact update on mid-dialog 2xx reply" logic may be invoked in
parallel, in case two simultaneous UPDATE transactions are being
processed, for example.  This patch adds locking, to prevent a possible
abort due to "double free" while updating the Contact.

Also fix a small bug where the dialog is still flagged with
DLG_FLAG_CHANGED, despite the malloc() failing during Contact update.

(cherry picked from commit 7dfe2857eef8e109e2c984867eb5e80193f220e1)





More information about the Devel mailing list