Project

General

Profile

0008-disklabel64-8-free-allocated-boot1buf-on-error.patch

liweitianux, 11/08/2017 07:07 AM

Download (976 Bytes)

View differences:

sbin/disklabel64/disklabel64.c
570 570
		boot1buf = malloc(rsize);
571 571
		bzero(boot1buf, rsize);
572 572
		r = read(f, boot1buf, rsize);
573
		if (r != (int)rsize)
573
		if (r != (int)rsize) {
574
			free(boot1buf);
574 575
			err(4, "%s", specname);
576
		}
575 577
	}
576 578
	lp = (void *)boot1buf;
577 579

  
578
-