.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) ST-Ericsson AB 2010 |
---|
3 | 4 | * Author: Sjur Brendeland |
---|
4 | | - * License terms: GNU General Public License (GPL) version 2 |
---|
5 | 5 | */ |
---|
6 | 6 | |
---|
7 | 7 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__ |
---|
.. | .. |
---|
269 | 269 | default: |
---|
270 | 270 | pr_warn("Request setup of bad link type = %d\n", |
---|
271 | 271 | param->linktype); |
---|
| 272 | + cfpkt_destroy(pkt); |
---|
272 | 273 | return -EINVAL; |
---|
273 | 274 | } |
---|
274 | 275 | req = kzalloc(sizeof(*req), GFP_KERNEL); |
---|
275 | | - if (!req) |
---|
| 276 | + if (!req) { |
---|
| 277 | + cfpkt_destroy(pkt); |
---|
276 | 278 | return -ENOMEM; |
---|
| 279 | + } |
---|
| 280 | + |
---|
277 | 281 | req->client_layer = user_layer; |
---|
278 | 282 | req->cmd = CFCTRL_CMD_LINK_SETUP; |
---|
279 | 283 | req->param = *param; |
---|