Skip to content

Commit 58a7119

Browse files
niedzwiecki-dawidjhedberg
authored andcommitted
mgmt: ec_host_cmd: usb: fix double free
Fix double free of a net buffer after request error. Signed-off-by: Dawid Niedzwiecki <[email protected]>
1 parent 6fd7280 commit 58a7119

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_usb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ static int ec_host_cmd_request(struct usbd_class_data *const c_data, struct net_
284284
if ((bi->ep == ec_host_cmd_get_in_int_ep(c_data)) ||
285285
(bi->ep == ec_host_cmd_get_out_ep(c_data))) {
286286
usbd_ep_buf_free(uds_ctx, buf);
287-
usbd_ep_buf_free(uds_ctx, buf);
288287
}
289288

290289
return 0;

0 commit comments

Comments
 (0)