From 85aec73d595b8847f9c4ea571deb127913f0d508 Mon Sep 17 00:00:00 2001 From: Ivan Vecera Date: Wed, 6 Nov 2013 14:02:36 +0100 Subject: [PATCH] tg3: avoid double-freeing of rx data memory If build_skb fails the memory associated with the ring buffer is freed but the ri->data member is not zeroed in this case. This causes a double-free of this memory in tg3_free_rings->... path. The patch moves this block after setting ri->data to NULL. It would be nice to fix this bug also in stable >= v3.4 trees. Cc: Nithin Nayak Sujir Cc: Michael Chan Signed-off-by: Ivan Vecera Acked-by: Michael Chan Signed-off-by: David S. Miller --- Reading git-format-patch failed