[patch 4/4] Passing efi related data via setup_data
Dave Young
dyoung at redhat.com
Sun Oct 27 21:12:54 EDT 2013
Hi, Simon
Thanks for review.
> > + int has_efi = 0;
>
> The indentation of the line below is inconsistent with the line above.
Will fix
>
> > +
> > + has_efi = access("/sys/firmware/efi/systab", F_OK);
> > + if (has_efi < 0)
> > + return;
> > +
> > + esd = malloc(sizeof(struct efi_setup_data));
> > + if (!esd)
> > + return;
>
> This function appears to leak esd.
I left the error handling after testing but later forgot to add them.
Will fix
>
> > + memset(esd, 0, sizeof(struct efi_setup_data));
> > + get_efi_value(esd);
> > + nr_maps = get_efi_runtime_map(&esd);
> > + size = nr_maps * sizeof(struct efi_mem_descriptor) + sizeof(struct efi_setup_data);
> > + sd = malloc(sizeof(struct setup_data) + size);
> > + if (!sd) {
> > + free(esd);
> > + return;
> > + }
>
> This function appears to leak sd.
Will fix
--
Thanks
Dave
More information about the kexec
mailing list