[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH] rocker: Fix memory leak reported by coverity
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-trivial] [PATCH] rocker: Fix memory leak reported by coverity |
Date: |
Tue, 23 Jun 2015 10:01:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 23/06/2015 07:23, Scott Feldman wrote:
> + rocker = g_malloc0(sizeof(*rocker));
> + if (!rocker) {
> + error_set(errp, ERROR_CLASS_GENERIC_ERROR, "out-of-memory");
> + return NULL;
> + }
> +
g_malloc0 aborts on OOM, so this is not necessary.
Paolo