]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: bcm2835-audio: double free in init error path
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 17 Dec 2018 07:08:54 +0000 (10:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 13:18:51 +0000 (14:18 +0100)
We free instance here and in the caller.  It should be only the caller
which handles it.

Fixes: d7ca3a71545b ("staging: bcm2835-audio: Operate non-atomic PCM ops")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c

index 0db412fd7c55f3891a13550ca36a4511f6d53c05..c0debdbce26c5b08c9827862909759bf3a4f5912 100644 (file)
@@ -138,7 +138,6 @@ vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance,
                dev_err(instance->dev,
                        "failed to open VCHI service connection (status=%d)\n",
                        status);
-               kfree(instance);
                return -EPERM;
        }