[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 6/8] s390: sclp event facility and signal quiesc
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 6/8] s390: sclp event facility and signal quiesce support via system_powerdown |
Date: |
Wed, 13 Jun 2012 15:12:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0 |
Am 13.06.2012 09:00, schrieb Heinz Graalfs:
> Alex, thanks for the comments,
>
> On Tue, 2012-06-12 at 13:38 +0200, Alexander Graf wrote:
>> On 06/06/2012 02:05 PM, Jens Freimann wrote:
>>> +static SCLPDevice *sclpef_common_init(const char *name, size_t struct_size)
>>> +{
>>> + SCLPDevice *sdev;
>>> +
>>> + sdev = malloc(struct_size);
>>
>> g_malloc please. I suppose even g_malloc0?
>>
> OK, I will look into this
Careful: The equivalent of malloc() and a NULL check is g_try_malloc().
g_malloc() aborts on failure to allocate.
The line to draw is whether this only happens at startup or whether this
is called at runtime *and* you are willing to consequently handle the
possible NULL return in all callers.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
[Qemu-devel] [PATCH 5/8] s390: Cleanup sclp functions, Jens Freimann, 2012/06/06
Re: [Qemu-devel] [PATCH 5/8] s390: Cleanup sclp functions, Anthony Liguori, 2012/06/12
[Qemu-devel] [PATCH 2/8] s390: autodetect map private, Jens Freimann, 2012/06/06