* [Qemu-devel] [PATCH] Check return value of qemu_mallocz in qemu_new_timer
@ 2009-01-15 10:55 vibisreenivasan
2009-01-15 20:49 ` Anthony Liguori
0 siblings, 1 reply; 2+ messages in thread
From: vibisreenivasan @ 2009-01-15 10:55 UTC (permalink / raw)
To: qemu-devel
Check return value of qemu_mallocz in qemu_new_timer
Signed-off-by: vibi sreenivasan <vibi_sreenivasan@cms.com>
---
vl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/vl.c b/vl.c
index e29072b..ffec27f 100644
--- a/vl.c
+++ b/vl.c
@@ -1119,6 +1119,8 @@ QEMUTimer *qemu_new_timer(QEMUClock *clock,
QEMUTimerCB *cb, void *opaque)
QEMUTimer *ts;
ts = qemu_mallocz(sizeof(QEMUTimer));
+ if (!ts)
+ return NULL;
ts->clock = clock;
ts->cb = cb;
ts->opaque = opaque;
--
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Check return value of qemu_mallocz in qemu_new_timer
2009-01-15 10:55 [Qemu-devel] [PATCH] Check return value of qemu_mallocz in qemu_new_timer vibisreenivasan
@ 2009-01-15 20:49 ` Anthony Liguori
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2009-01-15 20:49 UTC (permalink / raw)
To: vibi_sreenivasan, qemu-devel
vibisreenivasan wrote:
> Check return value of qemu_mallocz in qemu_new_timer
>
> Signed-off-by: vibi sreenivasan <vibi_sreenivasan@cms.com>
> ---
>
> vl.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index e29072b..ffec27f 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1119,6 +1119,8 @@ QEMUTimer *qemu_new_timer(QEMUClock *clock,
> QEMUTimerCB *cb, void *opaque)
>
Your mailer munged this patch.
Regards,
Anthony Liguori
> QEMUTimer *ts;
>
> ts = qemu_mallocz(sizeof(QEMUTimer));
> + if (!ts)
> + return NULL;
> ts->clock = clock;
> ts->cb = cb;
> ts->opaque = opaque;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-15 20:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15 10:55 [Qemu-devel] [PATCH] Check return value of qemu_mallocz in qemu_new_timer vibisreenivasan
2009-01-15 20:49 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).