Branch: refs/heads/3.3
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 38fe92cb2ab4d725eb093f196f85417fd092d812
      
https://github.com/OpenSIPS/opensips/commit/38fe92cb2ab4d725eb093f196f85417fd092d812
  Author: Bogdan-Andrei Iancu <bog...@opensips.org>
  Date:   2023-01-16 (Mon, 16 Jan 2023)

  Changed paths:
    M modules/tm/uac.c

  Log Message:
  -----------
  [tm] fixed double freeing on t_uac() callback param

If the t_uac() fails after the transaction was created (like it fails while 
trying to send the buffer out on the network), a double free will be done on 
the eventual callback func params: (1) via the released function attached to 
the completion callback (this will be automatically done upon free_cell() and 
(2) when t_uac() returns failure to the upper layer.

The fix is NOT to free the param if the t_uac() returns error. So even if the 
transaction was created, remove the release function on the callback func 
params, to prevent the free (1), and to allow the upper layer to do its own 
cleanup.

(cherry picked from commit 8448551cc4c1b6d4069790e54a149f4ffd0b4c47)



_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to