All of lore.kernel.org
 help / color / mirror / Atom feed
* libiptc memory leak - PATCH
@ 2003-04-21 22:25 Tomáš Lejdar
  2003-04-27 12:51 ` Harald Welte
  2003-04-27 12:53 ` Harald Welte
  0 siblings, 2 replies; 11+ messages in thread
From: Tomáš Lejdar @ 2003-04-21 22:25 UTC (permalink / raw)
  To: netfilter-devel

Hi,
I've used libiptc for some utils and found a little
problem with memory allocation, discused in January and
may be earlier. Here is a small patch (r.1.2.8):

*** libiptc/libiptc.c.orig      Mon Apr 21 23:54:48 2003
--- libiptc/libiptc.c   Mon Apr 21 23:59:30 2003
***************
*** 504,511 ****
         (*handle)->cache_chain_iteration++;

         if ((*handle)->cache_chain_iteration - (*handle)->cache_chain_heads
!           == (*handle)->cache_num_chains)
                 return NULL;

         return (*handle)->cache_chain_iteration->name;
   }
--- 504,513 ----
         (*handle)->cache_chain_iteration++;

         if ((*handle)->cache_chain_iteration - (*handle)->cache_chain_heads
!           == (*handle)->cache_num_chains){
!                 free((*handle)->cache_chain_heads);
                 return NULL;
+       }

         return (*handle)->cache_chain_iteration->name;
   }

T.v.L

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-05-03 20:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-21 22:25 libiptc memory leak - PATCH Tomáš Lejdar
2003-04-27 12:51 ` Harald Welte
2003-04-27 12:53 ` Harald Welte
2003-04-28  7:14   ` Tomáš Lejdar
2003-04-30 15:47     ` Harald Welte
2003-05-02 12:47       ` Martin Josefsson
2003-05-02 13:47         ` Martin Josefsson
2003-05-02 14:14           ` Martin Josefsson
2003-05-02 15:21             ` Harald Welte
2003-05-03 20:52               ` Martin Josefsson
2003-05-02 15:14         ` Harald Welte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.