[OpenSIPS-Devel] [OpenSIPS/opensips] 7834aa: [acc] fix double free issue for multiple dlg callb...

ionutrazvanionita ionutionita at opensips.org
Fri May 27 16:50:42 CEST 2016


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 7834aa5d86187c5fda416fb2763510a015da351a
      https://github.com/OpenSIPS/opensips/commit/7834aa5d86187c5fda416fb2763510a015da351a
  Author: ionutrazvanionita <ionutionita at opensips.org>
  Date:   2016-05-27 (Fri, 27 May 2016)

  Changed paths:
    M modules/acc/acc_logic.c
    M modules/acc/acc_logic.h

  Log Message:
  -----------
  [acc] fix double free issue for multiple dlg callbacks

	The last byte in acc flag mask now holds a ref counter in
the last byte. The counter is increased each time a dialog callback
is invoked, and decreased for each free function corresponding to
a callback. When the ref counter reaches 0, flags can be freed.
The atomicity of the ref counter is based on the fact that
dialog callbacks and their free functions are called sequentially,
one after the other.
ACC_DIALOG_CONTEXT and ACC_CDR_REGISTERED flags where moved in the
7th byte of the flags.




More information about the Devel mailing list