Commit 351a5de3 authored by Jonathan Jenkins's avatar Jonathan Jenkins

fix - pointer to local buffer escaped

parent 4e19d940
...@@ -803,7 +803,7 @@ terminal_init( terminal_state * s, ...@@ -803,7 +803,7 @@ terminal_init( terminal_state * s,
s->params = &all_params[num_params-1]; s->params = &all_params[num_params-1];
} }
else{ else{
s->anno = anno; s->anno = strdup(anno);
int id = configuration_get_annotation_index(anno, anno_map); int id = configuration_get_annotation_index(anno, anno_map);
s->params = &all_params[id]; s->params = &all_params[id];
} }
...@@ -1517,7 +1517,7 @@ void router_setup(router_state * r, tw_lp * lp) ...@@ -1517,7 +1517,7 @@ void router_setup(router_state * r, tw_lp * lp)
r->params = &all_params[num_params-1]; r->params = &all_params[num_params-1];
} }
else{ else{
r->anno = anno; r->anno = strdup(anno);
int id = configuration_get_annotation_index(anno, anno_map); int id = configuration_get_annotation_index(anno, anno_map);
r->params = &all_params[id]; r->params = &all_params[id];
} }
......
...@@ -359,7 +359,7 @@ static void torus_init( nodes_state * s, ...@@ -359,7 +359,7 @@ static void torus_init( nodes_state * s,
s->params = &all_params[num_params-1]; s->params = &all_params[num_params-1];
} }
else{ else{
s->anno = anno; s->anno = strdup(anno);
int id = configuration_get_annotation_index(anno, anno_map); int id = configuration_get_annotation_index(anno, anno_map);
s->params = &all_params[id]; s->params = &all_params[id];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment