mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	cohuck@de.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [patch 14/17] s390: introduce struct channel_subsystem.
Date: Sat, 10 Dec 2005 10:25:28 +0100	[thread overview]
Message-ID: <a070070d0512100125m33b335f3j@mail.gmail.com> (raw)
In-Reply-To: <20051209235225.3936c1a0.akpm@osdl.org>

2005/12/10, Andrew Morton <akpm@osdl.org>:
> Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:
> >
> > +     /* Setup css structure. */
> >  +    for (i = 0; i <= __MAX_CSSID; i++) {
> >  +            css[i] = kmalloc(sizeof(struct channel_subsystem), GFP_KERNEL);
> >  +            if (!css[i]) {
> >  +                    ret = -ENOMEM;
> >  +                    goto out_bus;
> >  +            }
> >  +            setup_css(i);
> >  +            ret = device_register(&css[i]->device);
> >  +            if (ret)
> >  +                    goto out_free;
> >  +    }
> >       css_init_done = 1;
> >
> >       ctl_set_bit(6, 28);
> >
> >       for_each_subchannel(__init_channel_subsystem, NULL);
> >       return 0;
> >  +out_free:
> >  +    kfree(css[i]);
> >   out_bus:
> >  +    while (i > 0) {
> >  +            i--;
> >  +            device_unregister(&css[i]->device);
> >  +    }
>
> I spy a memory leak.

Ugh, yes. Where has that release function gone? I'll send an
updated patch.

Cornelia

      reply	other threads:[~2005-12-10  9:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-09 15:28 Martin Schwidefsky
2005-12-10  7:52 ` Andrew Morton
2005-12-10  9:25   ` Cornelia Huck [this message]

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=a070070d0512100125m33b335f3j@mail.gmail.com \
    --to=cornelia.huck@gmail.com \
    --cc=akpm@osdl.org \
    --cc=cohuck@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome