Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66826
b: refs/heads/master
c: aace57e
h: refs/heads/master
v: v3
  • Loading branch information
Michal Miroslaw authored and David S. Miller committed Oct 10, 2007
1 parent 8599369 commit 8d592c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6a8f648362a5d8b934f4267b0ab9f255c130ab0
refs/heads/master: aace57e054e9322e20af52cede7de46ade64a5e2
10 changes: 5 additions & 5 deletions trunk/net/netfilter/nfnetlink_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ instance_create(u_int16_t group_num, int pid)
if (!inst)
goto out_unlock;

if (!try_module_get(THIS_MODULE)) {
kfree(inst);
goto out_unlock;
}

INIT_HLIST_NODE(&inst->hlist);
spin_lock_init(&inst->lock);
/* needs to be two, since we _put() after creation */
Expand All @@ -168,9 +173,6 @@ instance_create(u_int16_t group_num, int pid)
inst->copy_mode = NFULNL_COPY_PACKET;
inst->copy_range = 0xffff;

if (!try_module_get(THIS_MODULE))
goto out_free;

hlist_add_head(&inst->hlist,
&instance_table[instance_hashfn(group_num)]);

Expand All @@ -181,8 +183,6 @@ instance_create(u_int16_t group_num, int pid)

return inst;

out_free:
instance_put(inst);
out_unlock:
write_unlock_bh(&instances_lock);
return NULL;
Expand Down

0 comments on commit 8d592c4

Please sign in to comment.