Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8ec8bb4 authored by Ramesh V's avatar Ramesh V Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: avoid invalid memory access



In sd_shutdown function during camera close avoid to access
invalid memory.

Change-Id: I83a98342c554db6e70d569485a70fdc4e323265e
Signed-off-by: default avatarRamesh V <ramev@codeaurora.org>
parent c1551685
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -252,7 +252,7 @@ static void msm_buf_mngr_sd_shutdown(struct msm_buf_mngr_device *dev,
			pr_info("%s: Delete invalid bufs =%lx, session_id=%u, bufs->ses_id=%d, str_id=%d, idx=%d\n",
				__func__, (unsigned long)bufs, session->session,
				bufs->session_id, bufs->stream_id,
				bufs->vb2_buf->v4l2_buf.index);
				bufs->index);
			if (session->session == bufs->session_id) {
				list_del_init(&bufs->entry);
				kfree(bufs);