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
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to