qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c
@ 2008-01-03  2:29 Robert Reif
  2008-01-03  2:43 ` Paul Brook
  0 siblings, 1 reply; 12+ messages in thread
From: Robert Reif @ 2008-01-03  2:29 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: ptimer.c.diff.txt --]
[-- Type: text/plain, Size: 383 bytes --]

diff -p -u -r1.5 ptimer.c
--- hw/ptimer.c	17 Nov 2007 17:14:47 -0000	1.5
+++ hw/ptimer.c	3 Jan 2008 02:27:18 -0000
@@ -185,6 +185,8 @@ ptimer_state *ptimer_init(QEMUBH *bh)
     ptimer_state *s;
 
     s = (ptimer_state *)qemu_mallocz(sizeof(ptimer_state));
+    if (!s)
+        return NULL;
     s->bh = bh;
     s->timer = qemu_new_timer(vm_clock, ptimer_tick, s);
     return s;

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-01-06 12:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03  2:29 [Qemu-devel] [PATCH] fix possible NULL pointer use in hw/ptimer.c Robert Reif
2008-01-03  2:43 ` Paul Brook
2008-01-03  2:57   ` Robert Reif
2008-01-03 14:02     ` Paul Brook
2008-01-04 17:29       ` Markus Hitter
2008-01-04 17:44         ` Paul Brook
2008-01-04 18:14           ` Robert Reif
2008-01-05  0:44         ` Rob Landley
2008-01-05  1:07           ` Paul Brook
2008-01-05  2:47             ` Rob Landley
2008-01-05  9:55               ` Markus Hitter
2008-01-06 12:14                 ` Avi Kivity

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).