diff options
Diffstat (limited to '')
-rw-r--r-- | net/caif/cfctrl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c index a1e85f032..330cb2b08 100644 --- a/net/caif/cfctrl.c +++ b/net/caif/cfctrl.c @@ -269,11 +269,15 @@ int cfctrl_linkup_request(struct cflayer *layer, default: pr_warn("Request setup of bad link type = %d\n", param->linktype); + cfpkt_destroy(pkt); return -EINVAL; } req = kzalloc(sizeof(*req), GFP_KERNEL); - if (!req) + if (!req) { + cfpkt_destroy(pkt); return -ENOMEM; + } + req->client_layer = user_layer; req->cmd = CFCTRL_CMD_LINK_SETUP; req->param = *param; |