qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c


From: Paul Brook
Subject: Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c
Date: Thu, 3 Jan 2008 14:02:55 +0000
User-agent: KMail/1.9.7

> We currently don't check the return value in the init function where the
> new timer is created but do check it wherever it is used which is backwards
> and wasteful.
>
> You would prefer that qemu just segfaults rather than die gracefully?

I think qemu should die before it returns from qemu_malloc.

Having to check every return value is extremely tedious and (as you've proved) 
easy to miss.  If the allocation fails we don't have any viable alternatives, 
so we may as well stop right there.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]