All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yin Kangkai <kangkai.yin@linux.intel.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH 2/2] malloc -> calloc and fix some memory leaks.
Date: Mon, 02 Aug 2010 10:00:26 +0000	[thread overview]
Message-ID: <20100802100026.GL29131@kai-debian> (raw)
In-Reply-To: <20100802034353.GK29131@kai-debian>

On 2010-08-02, 11:00 +0200, Kay Sievers wrote:
> On Mon, Aug 2, 2010 at 05:43, Yin Kangkai <kangkai.yin@linux.intel.com> wrote:
> > From fd81bea16d3e1e93aebc8cb80ec16ae9c20c6e41 Mon Sep 17 00:00:00 2001
> > From: Yin Kangkai <kangkai.yin@intel.com>
> > Date: Mon, 2 Aug 2010 11:22:49 +0800
> > Subject: [PATCH 2/2] malloc -> calloc and fix some memory leaks.
> >
> > calloc so that we do not need to memset each of them.
> 
> Any reason to change things to calloc() where no memset() is done or needed?

I changed the malloc and memset pair of udev_rules allocation, and for
consistence, I finished the others :)

Maybe it's only my personal taste that I like to memset memory once I
malloc success. If this is not necessary, I can split the patch.

Thanks,
Kangkai

  parent reply	other threads:[~2010-08-02 10:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02  3:43 [PATCH 2/2] malloc -> calloc and fix some memory leaks Yin Kangkai
2010-08-02  9:00 ` Kay Sievers
2010-08-02 10:00 ` Yin Kangkai [this message]
2010-08-02 10:13 ` Kay Sievers

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=20100802100026.GL29131@kai-debian \
    --to=kangkai.yin@linux.intel.com \
    --cc=linux-hotplug@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.