linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santosh Sivaraj <ssantosh@fossix.org>
To: ratheesh k <ratheesh.ksz@gmail.com>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Any problem ?
Date: Fri, 28 Jan 2011 17:32:43 +0530	[thread overview]
Message-ID: <4D42B063.8030906@fossix.org> (raw)
In-Reply-To: <AANLkTikRjcxV6+uUr+8_5LHjCMiFf91d00bH7wu7p6CX@mail.gmail.com>

On 01/28/2011 05:23 PM, ratheesh k wrote:
> void free_it(char *ptr)
> {
>   free(ptr);
> }
>
>
> int main()
> {
> char *str = (char *)malloc(100);
> strcpy(str, "Ratheesh");
> free_it(str);
> str=NULL;
> return 0;
> }
Nothing is wrong.. should work fine.

Santosh
--
http://fossix.org

  reply	other threads:[~2011-01-28 12:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28 11:53 Any problem ? ratheesh k
2011-01-28 12:02 ` Santosh Sivaraj [this message]
     [not found] ` <AANLkTimg=+0jUVjyG2Zq7ZqC=A5XbjWfkjoJADmPsULK@mail.gmail.com>
2011-01-28 20:46   ` Leon Romanovsky
2011-01-28 21:01     ` David Astua

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=4D42B063.8030906@fossix.org \
    --to=ssantosh@fossix.org \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=ratheesh.ksz@gmail.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;
as well as URLs for NNTP newsgroup(s).