]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixed freeing of non-embedded extended attributes.
authorMartin Mares <mj@ucw.cz>
Fri, 19 May 2000 18:05:01 +0000 (18:05 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 19 May 2000 18:05:01 +0000 (18:05 +0000)
nest/rt-attr.c

index 53e85a6a571ea4f5080fefafdbcb0a27f3e54344..8b4dc43eda2065f463ed1852fa70bf1d7b7dae90 100644 (file)
@@ -251,9 +251,17 @@ ea_list_copy(ea_list *o)
 static inline void
 ea_free(ea_list *o)
 {
+  int i;
+
   if (o)
     {
       ASSERT(!o->next);
+      for(i=0; i<o->count; i++)
+       {
+         eattr *a = &o->attrs[i];
+         if (!(a->type & EAF_EMBEDDED))
+           mb_free(a->u.ptr);
+       }
       mb_free(o);
     }
 }