]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes a minor memory wasting.
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 23 Dec 2010 09:25:22 +0000 (10:25 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Thu, 23 Dec 2010 09:25:22 +0000 (10:25 +0100)
proto/ospf/topology.c

index e604bf87ac3fdacca04fb7004dc9b173db20f87e..bb608498239be54bfe045115ecc71855f3031c9d 100644 (file)
@@ -119,7 +119,7 @@ lsab_allocz(struct proto_ospf *po, unsigned size)
 static inline void *
 lsab_flush(struct proto_ospf *po)
 {
-  void *r = mb_alloc(po->proto.pool, po->lsab_size);
+  void *r = mb_alloc(po->proto.pool, po->lsab_used);
   memcpy(r, po->lsab, po->lsab_used);
   po->lsab_used = 0;
   return r;