diff options
-rw-r--r-- | net/irda/af_irda.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index dd35641835f..b6cef980095 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -810,8 +810,8 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) err = irda_open_tsap(self, addr->sir_lsap_sel, addr->sir_name); if (err < 0) { - kfree(self->ias_obj->name); - kfree(self->ias_obj); + irias_delete_object(self->ias_obj); + self->ias_obj = NULL; return err; } |