[OpenSIPS-Devel] [OpenSIPS/opensips] 1505ad: Fix memory corruption on $stat() vars

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Jun 16 15:05:50 CEST 2016


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 1505ad27d3bc0bee05f63b7b26a19f90479cc28f
      https://github.com/OpenSIPS/opensips/commit/1505ad27d3bc0bee05f63b7b26a19f90479cc28f
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2016-06-16 (Thu, 16 Jun 2016)

  Changed paths:
    M modules/statistics/statistics.c

  Log Message:
  -----------
  Fix memory corruption on $stat() vars

The $stat() var specs are kept in pkg, while the name (if stat not found) is kept in memeory. This means all the copies (form all procs) of the specs will point to a single shm block. It is not safet to free this block as you have no idea how many copies of the spec (from other processes) still refer the name.
Closes #902

(cherry picked from commit 4baead765179f6bfbc098b3e59791d7bbc4a8d42)




More information about the Devel mailing list