iptables/iptables-1.3.2-free_opts.patch
Thomas Woerner 9cc8b9cede [tw]
- new version 1.3.2 with additional patch for the misplaced free_opts call
    from Marcus Sundberg
2005-07-18 12:16:48 +00:00

21 lines
730 B
Diff

--- iptables-1.3.2/iptables.c.free_opts 2005-07-18 14:06:41.000000000 +0200
+++ iptables-1.3.2/iptables.c 2005-07-18 14:06:40.000000000 +0200
@@ -1028,9 +1028,6 @@
unsigned int num_old, num_new, i;
struct option *merge;
- /* Release previous options merged if any */
- free_opts(0);
-
for (num_old = 0; oldopts[num_old].name; num_old++);
for (num_new = 0; newopts[num_new].name; num_new++);
@@ -1039,6 +1036,7 @@
merge = malloc(sizeof(struct option) * (num_new + num_old + 1));
memcpy(merge, oldopts, num_old * sizeof(struct option));
+ free_opts(0); /* Release previous options merged if any */
for (i = 0; i < num_new; i++) {
merge[num_old + i] = newopts[i];
merge[num_old + i].val += *option_offset;