There's invalid reallocation of config_table variable in config_insert_cgroup() function.
Signed-off-by: Peter Schiffer <pschi...@redhat.com> --- src/config.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index 06f559b..20fde9d 100644 --- a/src/config.c +++ b/src/config.c @@ -130,7 +130,7 @@ int config_insert_cgroup(char *cg_name, int flag) break; default: return 0; - } + } if (*table_index >= *max - 1) { struct cgroup *newblk; @@ -151,7 +151,17 @@ int config_insert_cgroup(char *cg_name, int flag) memset(newblk + oldlen, 0, (*max - oldlen) * sizeof(struct cgroup)); init_cgroup_table(newblk + oldlen, *max - oldlen); - config_cgroup_table = newblk; + config_table = newblk; + switch (flag) { + case CGROUP: + config_cgroup_table = config_table; + break; + case TEMPLATE: + config_template_table = config_table; + break; + default: + return 0; + } cgroup_dbg("maximum %d\n", *max); cgroup_dbg("reallocated config_table to %p\n", config_table); ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel