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

Commit 1a16f33e authored by Charan Teja Reddy's avatar Charan Teja Reddy
Browse files

msm_ion: set ptr to NULL on unmap



Set ptr to NULL on unmap to avoid using stale pointer.

Change-Id: I2cc8b70d6574ed59a84e567f750681d5b6335bd1
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent 513494c8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2018, 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
@@ -910,6 +910,7 @@ int msm_ion_heap_pages_zero(struct page **pages, int num_pages)

		memset(ptr, 0, npages_to_vmap * PAGE_SIZE);
		vunmap(ptr);
		ptr = NULL;
	}

	return 0;