Tom,

Interesting setup you have with send_query() don't think I have ever
seen it done that way in C. I might have been misreading this but from
my first glance at your code noticed that you free 'db' but you never
get around to freeing db->result, when you call mysql_store_restore() it
allocates memory for the MYSQL_RES structure. Take a look at
http://www.mysql.con/doc/n/o/node_714.html. You're going to have to call
mysql_free_result() to free up that memory.

kermit

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom
Whiting
Sent: Monday, June 10, 2002 3:05 AM
To: [email protected]
Subject: MySQL/Memory blahs

struct database *send_query(char *command)
{
....
       if (!(db->result=mysql_store_result(&my_connection)))
       {
        error_db(command, 2 );
        }
....
       return(db);
}



Reply via email to