All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Missing free on error in iptables 1.3.4
@ 2005-11-09 15:15 Marcus Sundberg
  2005-11-12 10:28 ` Harald Welte
  0 siblings, 1 reply; 2+ messages in thread
From: Marcus Sundberg @ 2005-11-09 15:15 UTC (permalink / raw)
  To: Harald Welte; +Cc: Netfilter Development Mailinglist

Hi,

the patch below fixes a missing free() statement in TC_COMMIT(),
and moves the setting of errno to come right before the return.

//Marcus

--- iptables.4490/libiptc/libiptc.c	(revision 4490)
+++ iptables/libiptc/libiptc.c	(working copy)
@@ -2081,9 +2081,10 @@

  	ret = iptcc_compile_table(*handle, repl);
  	if (ret < 0) {
-		errno = ret;
  		free(repl->counters);
  		free(repl);
+		free(newcounters);
+		errno = ret;
  		return 0;
  	}


Signed-off-by: Marcus Sundberg <marcus@ingate.com>

-- 
---------------------------------------+--------------------------
   Marcus Sundberg <marcus@ingate.com>  | Firewalls with SIP & NAT
  Software Developer, Ingate Systems AB |  http://www.ingate.com/

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

end of thread, other threads:[~2005-11-12 10:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-09 15:15 [PATCH] Missing free on error in iptables 1.3.4 Marcus Sundberg
2005-11-12 10:28 ` 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.