All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shahar Havivi <shaharh@redhat.com>
To: linux-next@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, greg@kroah.com
Subject: [PATCH] zram: free device memory when init fails
Date: Sat, 28 Aug 2010 10:09:05 +0300	[thread overview]
Message-ID: <20100828070901.GA31943@redhat.com> (raw)

Signed-off-by: Shahar Havivi <shaharh@redhat.com>
---
 drivers/staging/zram/zram_drv.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 77d4d71..e8d2319 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -769,6 +769,7 @@ static int __init zram_init(void)
 free_devices:
 	while (dev_id)
 		destroy_device(&devices[--dev_id]);
+    kfree(devices);
 unregister:
 	unregister_blkdev(zram_major, "zram");
 out:
-- 
1.7.2.1

                 reply	other threads:[~2010-08-28  7:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100828070901.GA31943@redhat.com \
    --to=shaharh@redhat.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.