Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #75272

Re: Memorry error?

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.c
Subject Re: Memorry error?
Date 2015-11-07 17:22 +0000
Organization A noiseless patient Spider
Message-ID <87fv0hu3kk.fsf@bsb.me.uk> (permalink)
References <892c6f15-df18-4132-a798-5fed68982edc@googlegroups.com> <cdb29e98-5047-48bd-b005-750c96dff15a@googlegroups.com> <n1kuko$hr2$1@dont-email.me> <4f6562dc-f0cb-4bdc-9522-d4eba25ad689@googlegroups.com>

Show all headers | View raw


Al la _ <modelling.data@gmail.com> writes:

> Thank you very much! I wonder why then they used free() when 
> there is no malloc in the program. Interesting.

Maybe you've mixed up two versions of the program: an early one with
fixed arrays and then a more sophisticated one where the names are
allocated (they'd be char *name and char *house in the struct).  It's
always possible that the course author has simply made a mistake, but
it's a pretty simple one to spot so that seems unlikely.

-- 
Ben.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Memorry error? Alla _ <modelling.data@gmail.com> - 2015-11-07 05:18 -0800
  Re: Memorry error? Alla _ <modelling.data@gmail.com> - 2015-11-07 05:19 -0800
  Re: Memorry error? Alla _ <modelling.data@gmail.com> - 2015-11-07 05:27 -0800
  Re: Memorry error? Alla _ <modelling.data@gmail.com> - 2015-11-07 05:30 -0800
    Re: Memorry error? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-11-07 08:36 -0500
      Re: Memorry error? Alla _ <modelling.data@gmail.com> - 2015-11-07 06:43 -0800
        Re: Memorry error? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-11-07 17:22 +0000
  Re: Memorry error? "Osmium" <r124c4u102@comcast.net> - 2015-11-07 07:33 -0600
  Re: Memorry error? Alla _ <modelling.data@gmail.com> - 2015-11-07 06:47 -0800
    Re: Memorry error? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-11-07 10:36 -0500
    Re: Memorry error? Keith Thompson <kst-u@mib.org> - 2015-11-07 13:37 -0800
    Re: Memorry error? Barry Schwarz <schwarzb@dqel.com> - 2015-11-07 16:26 -0800
      Re: Memorry error? Alla _ <modelling.data@gmail.com> - 2015-11-08 23:03 -0800
        Re: Memorry error? Barry Schwarz <schwarzb@dqel.com> - 2015-11-09 01:01 -0800
          Re: Memorry error? Keith Thompson <kst-u@mib.org> - 2015-11-09 08:27 -0800
            Re: Memorry error? raltbos@xs4all.nl (Richard Bos) - 2015-11-17 22:23 +0000
              Re: Memorry error? Keith Thompson <kst-u@mib.org> - 2015-11-17 15:31 -0800
                Re: Memorry error? raltbos@xs4all.nl (Richard Bos) - 2015-11-19 10:41 +0000
      Re: Memorry error? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-11-09 10:26 +0000

csiph-web