Showing error 1531

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: net/netfilter/x_tables.c
Line in file: 763
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

 733        return ERR_PTR(ret);
 734}
 735EXPORT_SYMBOL_GPL(xt_register_table);
 736
 737void *xt_unregister_table(struct xt_table *table)
 738{
 739        struct xt_table_info *private;
 740
 741        mutex_lock(&xt[table->af].mutex);
 742        private = table->private;
 743        list_del(&table->list);
 744        mutex_unlock(&xt[table->af].mutex);
 745        kfree(table);
 746
 747        return private;
 748}
 749EXPORT_SYMBOL_GPL(xt_unregister_table);
 750
 751#ifdef CONFIG_PROC_FS
 752struct xt_names_priv {
 753        struct seq_net_private p;
 754        u_int8_t af;
 755};
 756static void *xt_table_seq_start(struct seq_file *seq, loff_t *pos)
 757{
 758        struct xt_names_priv *priv = seq->private;
 759        struct net *net = seq_file_net(seq);
 760        u_int8_t af = priv->af;
 761
 762        mutex_lock(&xt[af].mutex);
 763        return seq_list_start(&net->xt.tables[af], *pos);
 764}
 765
 766static void *xt_table_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 767{
 768        struct xt_names_priv *priv = seq->private;
 769        struct net *net = seq_file_net(seq);
 770        u_int8_t af = priv->af;
 771
 772        return seq_list_next(v, &net->xt.tables[af], pos);
 773}
Show full sources