net: skb_orphan() changes
[firefly-linux-kernel-4.4.55.git] / include / linux / skbuff.h
index 5afefa01a13c892e1fe9eb7ce6fc3f047e5880ba..a95547adff257475014848bc7f61e26b4adeef43 100644 (file)
@@ -1805,10 +1805,11 @@ static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len)
  */
 static inline void skb_orphan(struct sk_buff *skb)
 {
-       if (skb->destructor)
+       if (skb->destructor) {
                skb->destructor(skb);
-       skb->destructor = NULL;
-       skb->sk         = NULL;
+               skb->destructor = NULL;
+               skb->sk         = NULL;
+       }
 }
 
 /**