Skip to content

Commit 2d95617

Browse files
Pranjal Ramajor Asha Kanojiyaquic-jhugo
authored andcommitted
accel/qaic: Fix slicing memory leak
The temporary buffer storing slicing configuration data from user is only freed on error. This is a memory leak. Free the buffer unconditionally. Fixes: ff13be8 ("accel/qaic: Add datapath") Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230802145937.14827-1-quic_jhugo@quicinc.com
1 parent e8470c0 commit 2d95617

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/accel/qaic/qaic_data.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,7 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
10211021
bo->dbc = dbc;
10221022
srcu_read_unlock(&dbc->ch_lock, rcu_id);
10231023
drm_gem_object_put(obj);
1024+
kfree(slice_ent);
10241025
srcu_read_unlock(&qdev->dev_lock, qdev_rcu_id);
10251026
srcu_read_unlock(&usr->qddev_lock, usr_rcu_id);
10261027

0 commit comments

Comments
 (0)