From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNZ9V-0002OX-47 for qemu-devel@nongnu.org; Thu, 15 Jan 2009 15:49:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNZ9U-0002Nn-HA for qemu-devel@nongnu.org; Thu, 15 Jan 2009 15:49:20 -0500 Received: from [199.232.76.173] (port=46577 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNZ9U-0002Ne-47 for qemu-devel@nongnu.org; Thu, 15 Jan 2009 15:49:20 -0500 Received: from qw-out-1920.google.com ([74.125.92.148]:64224) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LNZ9T-0001VA-PM for qemu-devel@nongnu.org; Thu, 15 Jan 2009 15:49:19 -0500 Received: by qw-out-1920.google.com with SMTP id 5so286999qwc.4 for ; Thu, 15 Jan 2009 12:49:18 -0800 (PST) Message-ID: <496FA143.4010104@codemonkey.ws> Date: Thu, 15 Jan 2009 14:49:07 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Check return value of qemu_mallocz in qemu_new_timer References: <1232016933.3532.7.camel@localhost.localdomain> In-Reply-To: <1232016933.3532.7.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: vibi_sreenivasan@cms.com, qemu-devel@nongnu.org vibisreenivasan wrote: > Check return value of qemu_mallocz in qemu_new_timer > > Signed-off-by: vibi sreenivasan > --- > > 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; >