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

Commit 3983cd22 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "selinux: fix double free in selinux_parse_opts_str()"

parents 4d8cfe50 708f1816
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
CONFIG_ARM64_SW_TTBR0_PAN=y
# CONFIG_ARM64_VHE is not set
CONFIG_RANDOMIZE_BASE=y
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
CONFIG_ARM64_SW_TTBR0_PAN=y
# CONFIG_ARM64_VHE is not set
CONFIG_RANDOMIZE_BASE=y
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
+3 −3
Original line number Diff line number Diff line
@@ -1092,10 +1092,9 @@ static int selinux_parse_opts_str(char *options,
		goto out_err;

	opts->mnt_opts_flags = kcalloc(NUM_SEL_MNT_OPTS, sizeof(int), GFP_ATOMIC);
	if (!opts->mnt_opts_flags) {
		kfree(opts->mnt_opts);
	if (!opts->mnt_opts_flags)
		goto out_err;
	}


	if (fscontext) {
		opts->mnt_opts[num_mnt_opts] = fscontext;
@@ -1118,6 +1117,7 @@ static int selinux_parse_opts_str(char *options,
	return 0;

out_err:
	security_free_mnt_opts(opts);
	kfree(context);
	kfree(defcontext);
	kfree(fscontext);