[PATCH] vfb: add a name to the pointer and keyboard
Julien Cristau
jcristau at debian.org
Sun Apr 4 05:30:56 PDT 2010
On Sat, Apr 3, 2010 at 17:13:27 -0300, Fernando Carrijo wrote:
> > diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c
> > index 35d1dc4..3136e93 100644
> > --- a/hw/vfb/InitInput.c
> > +++ b/hw/vfb/InitInput.c
> > @@ -139,7 +139,9 @@ InitInput(int argc, char *argv[])
> > p = AddInputDevice(serverClient, vfbMouseProc, TRUE);
> > k = AddInputDevice(serverClient, vfbKeybdProc, TRUE);
> > RegisterPointerDevice(p);
> > + p->name = strdup("mouse");
>
> Under shortage of memory, strdup() will return a NULL pointer.
>
If we're OOM at InitInput time we'll probably have other issues. But
yeah, I can make that xnfstrdup() so we'll FatalError instead.
Thanks,
Julien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100404/3fc4d53d/attachment.pgp>
More information about the xorg-devel
mailing list