summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-09-16 23:57:40 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-09-16 23:57:40 +0200
commit6a8d3f1c1ffbd964e4d11b452c73e1ea70310af3 (patch)
treeffad2ba5c281d87ec64f3b9f419b17251ef616a6 /proto/ospf
parentbf139664aa2ae9956b520ba4813bb6e03bf1a3e8 (diff)
BFD work in progress.
Now it compiles and mostly works.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/topology.c3
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;
}