Re: [PATCH] staging: speakup: more fixes for init-failure handling.

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

 



On Sun, Dec 19, 2010 at 03:07:15PM +0000, Christopher Brannon wrote:
>  	for (i = 0; i < MAX_NR_CONSOLES; i++)
> -		if (vc_cons[i].d)
> -			speakup_allocate(vc_cons[i].d);
> +		if (vc_cons[i].d) {
> +			err = speakup_allocate(vc_cons[i].d);
> +			if (err)
> +				goto error_alloc;
                                ^^^^^^^^^^^^^^^^^

This should be goto error_kobjects; or else we leak the previously
allocated elements including the first_console.

> +		}
> +

Otherwise it looks good.  Thanks so much for doing this.

regards,
dan carpenter


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux