diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-09-16 23:57:40 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-09-16 23:57:40 +0200 |
commit | 6a8d3f1c1ffbd964e4d11b452c73e1ea70310af3 (patch) | |
tree | ffad2ba5c281d87ec64f3b9f419b17251ef616a6 /proto/ospf/topology.c | |
parent | bf139664aa2ae9956b520ba4813bb6e03bf1a3e8 (diff) |
BFD work in progress.
Now it compiles and mostly works.
Diffstat (limited to 'proto/ospf/topology.c')
-rw-r--r-- | proto/ospf/topology.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index 5d93c0e9..f25db9a7 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -103,7 +103,8 @@ lsab_alloc(struct proto_ospf *po, unsigned size) if (po->lsab_used > po->lsab_size) { po->lsab_size = MAX(po->lsab_used, 2 * po->lsab_size); - po->lsab = mb_realloc(po->proto.pool, po->lsab, po->lsab_size); + po->lsab = po->lsab ? mb_realloc(po->lsab, po->lsab_size): + mb_alloc(po->proto.pool, po->lsab_size); } return ((byte *) po->lsab) + offset; } |