summaryrefslogtreecommitdiff
path: root/navit
diff options
context:
space:
mode:
authormvglasow <michael@vonglasow.com>2021-04-24 23:49:19 +0200
committerGitHub <noreply@github.com>2021-04-24 23:49:19 +0200
commit6667a64d43a68d1fe59f3ab4bd612ab626304661 (patch)
tree30edf37fc62cbe11d41425dbb3a479608ac44af5 /navit
parent89f4cf5a05ea78f019c2d89dd5477d5c6ba8ec19 (diff)
downloadnavit-6667a64d43a68d1fe59f3ab4bd612ab626304661.tar.gz
Fix:core:Fix read after free in traffic_message_restore_segments (#1114)
Signed-off-by: mvglasow <michael -at- vonglasow.com> Co-authored-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit')
-rw-r--r--navit/traffic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/navit/traffic.c b/navit/traffic.c
index 2359fea06..8dc3a1645 100644
--- a/navit/traffic.c
+++ b/navit/traffic.c
@@ -3689,11 +3689,11 @@ static int traffic_message_restore_segments(struct traffic_message * this_, stru
pitem = (struct parsed_item *) curr_item->data;
item = tm_add_item(map, pitem->type, pitem->id_hi, pitem->id_lo, pitem->flags, pitem->attrs,
pitem->coords, pitem->coord_count, this_->id);
- parsed_item_destroy(pitem);
tm_item_add_message_data(item, this_->id,
traffic_get_item_speed(item, seg_data, maxspeed),
traffic_get_item_delay(seg_data->delay, pitem->length, loc_len),
NULL, route);
+ parsed_item_destroy(pitem);
this_->priv->items[i] = item;
i++;
}