Fix possible leaks in netfilter.
Subsystems (2)
PATCH 1/1 Fix possible leaks in netfilter.
Spotted with the source checker from Coverity.com.
Signed-off-by Dave Jones <[email protected]>
net/ipv4/netfilter/ipt_recent.c +2 -0
@@ -827,6 +827,7 @@ checkentry(const char *tablename, if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() create_proc failed, no tables.\n");#endif spin_unlock_bh (&recent_lock); +vfree (hold);return -ENOMEM ; }while (strncmp (info->name,curr_table->name,IPT_RECENT_NAME_LEN ) && (last_table = curr_table) && (curr_table = curr_table->next) );
@@ -835,6 +836,7 @@ checkentry(const char *tablename, if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() create_proc failed, table already destroyed.\n");#endif spin_unlock_bh (&recent_lock); +vfree (hold);return -ENOMEM ; }if (last_table) last_table->next = curr_table->next;else r_tables = curr_table->next;