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 02:43:10 +0000
User-agent: KMail/1.9.7

>      s = (ptimer_state *)qemu_mallocz(sizeof(ptimer_state));
> +    if (!s)
> +        return NULL;

None of the callers bother to check the return value, And even if they did I 
don't think there's any point trying to gracefully handle OOM.  Just abort 
and be done with it.

I suggest guaranteeing that qemu_malloc will never return NULL, and removing 
the null checks from all the various users.

Paul




reply via email to

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