[OpenSIPS-Devel] [OpenSIPS/opensips] b14a7e: mid_registrar_save(): Fix shm memleak with no t_re...

Liviu Chircu noreply at github.com
Tue Nov 10 15:19:47 EST 2020


  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: b14a7eaff60b719c8b80af4f8bfdffe2bc7e995b
      https://github.com/OpenSIPS/opensips/commit/b14a7eaff60b719c8b80af4f8bfdffe2bc7e995b
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-11-10 (Tue, 10 Nov 2020)

  Changed paths:
    M modules/mid_registrar/save.c
    M modules/tm/t_hooks.h
    M modules/tm/tm_load.h

  Log Message:
  -----------
  mid_registrar_save(): Fix shm memleak with no t_relay()

Since mid_registrar_save() is stateful by definition, it needs the SIP
transaction to properly function, so always forcing its creation if the
REGISTER is about to be forwarded is not that significant of a change,
if any at all.

Thus, this patch fixes a SHM memleak on the following type of logic:

    mid_registrar_save();

    # script terminates without having created the transaction,
    # so mid_registrar's "prepped" data does not get freed on T deletion
    exit;





More information about the Devel mailing list