Skip to Content.
Sympa Menu

freetds - [freetds] src/tds/mem.c

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: 'TDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: [freetds] src/tds/mem.c
  • Date: Wed, 22 Oct 2003 14:42:43 -0400

mem.c has two functions that belong in an ODBC module:

char * tds_alloc_client_sqlstate(int msgnum);
char * tds_alloc_lookup_sqlstate(TDSSOCKET * tds, int msgnum);

The first does a lookup and a strdup(), the second just a lookup. They're
specific to ODBC and do essentially no memory management. And they probably
shouldn't be called "alloc" anything.

The rule of thumb IMO is mem.c functions should be alloc/free pairs.

--jkl

-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the original
message. Please note that we do not accept account orders and/or instructions
by e-mail, and therefore will not be responsible for carrying out such orders
and/or instructions.





  • [freetds] src/tds/mem.c, Lowden, James K, 10/22/2003

Archive powered by MHonArc 2.6.24.

Top of Page