RE: [PATCH] acpi/apei: free lists of resources in einj and erst

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -379,10 +379,9 @@ static int __einj_error_trigger(u64 trigger_paddr, u32 type,
 			rc = apei_resources_add(&addr_resources,
 				trigger_param_region->address,
 				trigger_param_region->bit_width/8, true);
-			if (rc)
-				goto out_fini;
-			rc = apei_resources_sub(&trigger_resources,
-					&addr_resources);
+			if (!rc)
+				rc = apei_resources_sub(&trigger_resources,
+							&addr_resources);
 		}
 		apei_resources_fini(&addr_resources);
 		if (rc)

This bit looks wrong ... the line right after the this diff ends is
			goto out_fini;

so we'll call apei_resources_fini() twice in the rc!=0 case.

-Tony
��.n��������+%������w��{.n�����{�����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux