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

Commit fe2fa980 authored by Shalini Krishnamoorthi's avatar Shalini Krishnamoorthi Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: free the correct layer_list in compat_atomic_commit



layer_list is a pointer allocated based on the number of input_layers.
While freeing scale and pp related parameters for each layer, wrong
pointer is used instead of layer_list. Fix the typo to use the
correct pointer.

Change-Id: I7ab0fe42075ab5b4dfa5c73667f94fb8f0b5cc32
Signed-off-by: default avatarShalini Krishnamoorthi <shakri@codeaurora.org>
parent c39fdd2a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -299,7 +299,7 @@ static int __compat_atomic_commit(struct fb_info *info, unsigned int cmd,
	struct mdp_layer_commit  commit;
	struct mdp_layer_commit32 commit32;
	u32 layer_count;
	struct mdp_input_layer *layer_list = NULL, *layer;
	struct mdp_input_layer *layer_list = NULL;
	struct mdp_input_layer32 *layer_list32 = NULL;
	struct mdp_output_layer *output_layer = NULL;

@@ -370,8 +370,8 @@ static int __compat_atomic_commit(struct fb_info *info, unsigned int cmd,
			argp, layer_count);

	for (i = 0; i < layer_count; i++) {
		kfree(layer[i].scale);
		mdss_mdp_free_layer_pp_info(&layer[i]);
		kfree(layer_list[i].scale);
		mdss_mdp_free_layer_pp_info(&layer_list[i]);
	}
	kfree(layer_list);
layer_list_err: