[Top][All Lists]
[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
- [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c, Robert Reif, 2008/01/02
- Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c,
Paul Brook <=
- Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c, Robert Reif, 2008/01/02
- Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c, Rob Landley, 2008/01/04
- Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c, Paul Brook, 2008/01/04
- Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c, Rob Landley, 2008/01/04
- Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c, Markus Hitter, 2008/01/05
- Re: [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c, Avi Kivity, 2008/01/06