Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=45542479fb261342d5244869cf3ca4636b7ffd43
Commit:     45542479fb261342d5244869cf3ca4636b7ffd43
Parent:     13996378e6585fb25e582afe7489bf52dde78deb
Author:     David Howells <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 21:37:22 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 21:37:22 2007 -0700

    [NET]: Fix uninitialised variable in ip_frag_reasm()
    
    Fix uninitialised variable in ip_frag_reasm().  err should be set to
    -ENOMEM if the initial call of skb_clone() fails.
    
    Signed-off-by: David Howells <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/ip_fragment.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index 453ae04..2143bf3 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -486,7 +486,6 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff 
*prev,
        if (prev) {
                head = prev->next;
                fp = skb_clone(head, GFP_ATOMIC);
-
                if (!fp)
                        goto out_nomem;
 
@@ -512,7 +511,6 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff 
*prev,
                goto out_oversize;
 
        /* Head of list must not be cloned. */
-       err = -ENOMEM;
        if (skb_cloned(head) && pskb_expand_head(head, 0, 0, GFP_ATOMIC))
                goto out_nomem;
 
@@ -568,6 +566,7 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff 
*prev,
 out_nomem:
        LIMIT_NETDEBUG(KERN_ERR "IP: queue_glue: no memory for gluing "
                              "queue %p\n", qp);
+       err = -ENOMEM;
        goto out_fail;
 out_oversize:
        if (net_ratelimit())
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to