[patch 4/4] Passing efi related data via setup_data

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

 



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



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux