Skip to content

Commit

Permalink
drouting: Store callbacks in pkg, not shm
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Feb 5, 2020
1 parent 7211e78 commit f12e8d5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/drouting/dr_cb.c
Expand Up @@ -24,7 +24,6 @@

#include <stdlib.h>
#include "../../dprint.h"
#include "../../mem/shm_mem.h"
#include "../../mem/mem.h"
#include "dr_cb.h"

Expand Down Expand Up @@ -56,7 +55,7 @@ static void destroy_dr_callbacks_list(struct dr_callback *cb)
cb_t->callback_param_free(cb_t->param);
cb_t->param = NULL;
}
shm_free(cb_t);
pkg_free(cb_t);
}
}

Expand Down Expand Up @@ -115,7 +114,7 @@ int register_dr_cb(enum drcb_types type, dr_cb f, void *param,
long int cb_sort_index = 0;
struct dr_callback *cb;

cb = shm_malloc(sizeof *cb);
cb = pkg_malloc(sizeof *cb);
if (!cb) {
LM_ERR("oom\n");
return -1;
Expand Down Expand Up @@ -156,7 +155,7 @@ int register_dr_cb(enum drcb_types type, dr_cb f, void *param,

return 0;
error:
shm_free(cb);
pkg_free(cb);
return -1;
}

Expand Down

0 comments on commit f12e8d5

Please sign in to comment.