diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2017-09-09 14:23:56 +0300 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2017-12-31 12:20:59 +0100 |
commit | f23b74736458d2415dd1dfec0559af44e6353574 (patch) | |
tree | ed9911eb6e2f756eeb625d5825d02c5e43173104 /src/common.c | |
parent | 750c896b4a9e619bbc6f712f82b8d602a1750f96 (diff) |
libosmogapk: introduce the internal root talloc context
In order to simplify memory leak debugging, this change introduces
the library's internal talloc context that may be changed by
external application by calling the osmo_gapk_set_talloc_ctx().
Diffstat (limited to 'src/common.c')
-rw-r--r-- | src/common.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common.c b/src/common.c index 1984d29..9448362 100644 --- a/src/common.c +++ b/src/common.c @@ -17,6 +17,16 @@ * along with gapk. If not, see <http://www.gnu.org/licenses/>. */ +#include <talloc.h> + +/* Internal root talloc context */ +TALLOC_CTX *gapk_root_ctx = NULL; + +void osmo_gapk_set_talloc_ctx(void *ctx) +{ + gapk_root_ctx = ctx; +} + /* Internal GAPK logging */ int osmo_gapk_log_init_complete = 0; int osmo_gapk_log_subsys; |