All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tomáš Lejdar" <tomas.lejdar@i.cz>
To: netfilter-devel@lists.netfilter.org
Subject: libiptc memory leak - PATCH
Date: Tue, 22 Apr 2003 00:25:34 +0200	[thread overview]
Message-ID: <3EA46FDE.6040806@i.cz> (raw)

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

             reply	other threads:[~2003-04-21 22:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-21 22:25 Tomáš Lejdar [this message]
2003-04-27 12:51 ` libiptc memory leak - PATCH 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EA46FDE.6040806@i.cz \
    --to=tomas.lejdar@i.cz \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.