Commit 14fe8153 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix memleak in ircomm_core

Patch from Oleg Drokin <green@linuxhacker.ru>

There seems to be a memleak on error exit path.
parent 0f3b450d
...@@ -119,8 +119,10 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line) ...@@ -119,8 +119,10 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line)
} else } else
ret = ircomm_open_tsap(self); ret = ircomm_open_tsap(self);
if (ret < 0) if (ret < 0) {
kfree(self);
return NULL; return NULL;
}
self->service_type = service_type; self->service_type = service_type;
self->line = line; self->line = line;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment