Fixes a bug with setting preference during show route cmd.

If show route cmd was used with a filter that changed preference,
BIRD crashed.
This commit is contained in:
Ondrej Zajicek 2011-05-21 22:48:08 +02:00
parent 1155c79209
commit 5e9bdac28e

View file

@ -1721,7 +1721,10 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
ia[0] = 0; ia[0] = 0;
} }
if (e != ee) if (e != ee)
rte_free(ee); {
rte_free(e);
e = ee;
}
rte_update_unlock(); rte_update_unlock();
if (d->primary_only) if (d->primary_only)
break; break;