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

Liviu Chircu noreply at github.com
Tue Nov 10 15:20:22 EST 2020


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: fccb5bfdfeb0615b47291b9379fe6d87e199d0c2
      https://github.com/OpenSIPS/opensips/commit/fccb5bfdfeb0615b47291b9379fe6d87e199d0c2
  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;

(cherry picked from commit b14a7eaff60b719c8b80af4f8bfdffe2bc7e995b)





More information about the Devel mailing list