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

Bogdan-Andrei Iancu bogdan at opensips.org
Fri Jul 22 17:00:02 CEST 2016


  Branch: refs/heads/2.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 9568db85c4d4111f5ff93f92f034f84a6cae5ff6
      https://github.com/OpenSIPS/opensips/commit/9568db85c4d4111f5ff93f92f034f84a6cae5ff6
  Author: Ozzyboshi <gun101 at email.it>
  Date:   2016-07-22 (Fri, 22 Jul 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: 3fab95ad98afd1515afedff0c90800e8994003c8
      https://github.com/OpenSIPS/opensips/commit/3fab95ad98afd1515afedff0c90800e8994003c8
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2016-07-22 (Fri, 22 Jul 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/f0902380a5ed...3fab95ad98af


More information about the Devel mailing list