Lines Matching refs:buf
75 char *buf; in scan_boot_part() local
89 buf = malloc(bufsz); in scan_boot_part()
90 if (!buf) in scan_boot_part()
93 ret = blk_read(blk, partition.start, num_blks, buf); in scan_boot_part()
95 free(buf); in scan_boot_part()
99 if (!is_android_boot_image_header(buf)) { in scan_boot_part()
100 free(buf); in scan_boot_part()
104 if (!android_image_get_bootimg_size(buf, &priv->boot_img_size)) { in scan_boot_part()
105 free(buf); in scan_boot_part()
109 priv->header_version = ((struct andr_boot_img_hdr_v0 *)buf)->header_version; in scan_boot_part()
111 free(buf); in scan_boot_part()
122 char *buf; in scan_vendor_boot_part() local
136 buf = malloc(bufsz); in scan_vendor_boot_part()
137 if (!buf) in scan_vendor_boot_part()
140 ret = blk_read(blk, partition.start, num_blks, buf); in scan_vendor_boot_part()
142 free(buf); in scan_vendor_boot_part()
146 if (!is_android_vendor_boot_image_header(buf)) { in scan_vendor_boot_part()
147 free(buf); in scan_vendor_boot_part()
151 if (!android_image_get_vendor_bootimg_size(buf, &priv->vendor_boot_img_size)) { in scan_vendor_boot_part()
152 free(buf); in scan_vendor_boot_part()
156 free(buf); in scan_vendor_boot_part()