[OpenSIPS-Devel] [OpenSIPS/opensips] 89f78e: Fixed memory leak on modules/drouting/drouting.c

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Oct 4 11:04:20 CEST 2016


  Branch: refs/heads/1.11
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 89f78e35a6e6e472beaf278db800d9b6b9f48ca7
      https://github.com/OpenSIPS/opensips/commit/89f78e35a6e6e472beaf278db800d9b6b9f48ca7
  Author: Ozzyboshi <gun101 at email.it>
  Date:   2016-10-04 (Tue, 04 Oct 2016)

  Changed paths:
    M modules/drouting/drouting.c

  Log Message:
  -----------
  Fixed memory leak on modules/drouting/drouting.c

This leak occures in function get_group_id() when do_routing is called without parameters in opensips.cfg.
In this case the dr_default_grp variable is not equal -1 and 'return dr_default_grp' is executed without freeing the res variable previously allocated for query execution.

(cherry picked from commit 65739943151f08aee18a7bc2125c7ac90ee84d00)


  Commit: 1ea39dd6265538eb1ebb5989b5da0b66b31a3170
      https://github.com/OpenSIPS/opensips/commit/1ea39dd6265538eb1ebb5989b5da0b66b31a3170
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2016-10-04 (Tue, 04 Oct 2016)

  Changed paths:
    M modules/drouting/drouting.c

  Log Message:
  -----------
  Remove unnecessary test.

"res" cannot be null at that point

(cherry picked from commit 0b60681f0cc08ffd13fbac3dc5cbde17904ad177)


Compare: https://github.com/OpenSIPS/opensips/compare/e95ccf83c69d...1ea39dd62655


More information about the Devel mailing list