|
@@ -571,8 +571,10 @@ static int x25_asy_open_tty(struct tty_struct *tty)
|
|
|
|
|
|
/* Perform the low-level X.25 async init */
|
|
/* Perform the low-level X.25 async init */
|
|
err = x25_asy_open(sl->dev);
|
|
err = x25_asy_open(sl->dev);
|
|
- if (err)
|
|
|
|
|
|
+ if (err) {
|
|
|
|
+ x25_asy_free(sl);
|
|
return err;
|
|
return err;
|
|
|
|
+ }
|
|
/* Done. We have linked the TTY line to a channel. */
|
|
/* Done. We have linked the TTY line to a channel. */
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|