net/wan: fix a double free in x25_asy_open_tty()
[platform/kernel/linux-rpi.git] / drivers / net / wan / x25_asy.c
index 74c06a5..4f25c2d 100644 (file)
@@ -486,8 +486,10 @@ static int x25_asy_open(struct net_device *dev)
 
        /* Cleanup */
        kfree(sl->xbuff);
+       sl->xbuff = NULL;
 noxbuff:
        kfree(sl->rbuff);
+       sl->rbuff = NULL;
 norbuff:
        return -ENOMEM;
 }