Changeset 45f2d70c376339f71f20b78275ce5618a7be4910

Show
Ignore:
Timestamp:
03/14/11 23:04:01 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1300143841 +0000
git-parent:

[e9dea15c596d028be11696594b9a5653665a4d2d]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1300143841 +0000
Message:

attempt to free and disconnect in the asynch portion of the code

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/mysql.c

    r32ceedd r45f2d70  
    187187 
    188188#define AVAIL_BAIL(str) do { \ 
     189  MYSQL *conn_swap = ci->conn; \ 
     190  MYSQL_RES *result_swap = ci->result; \ 
     191  if(ci->result) { \ 
     192    ci->result = NULL; \ 
     193    mysql_free_result(result_swap); \ 
     194  } \ 
     195  if(ci->conn) { \ 
     196    ci->conn = NULL; \ 
     197    mysql_close(conn_swap); \ 
     198  } \ 
    189199  ci->timed_out = 0; \ 
    190200  ci->error = strdup(str); \ 
     
    321331      ci->rv = mysql_num_rows(ci->result); 
    322332      mysql_ingest_stats(ci); 
     333      if(ci->result) { 
     334        MYSQL_RES *result_swap = ci->result; 
     335        ci->result = NULL; 
     336        mysql_free_result(result_swap); 
     337      } 
     338      if(ci->conn) { 
     339        MYSQL *conn_swap = ci->conn; 
     340        ci->conn = NULL; 
     341        mysql_close(conn_swap); 
     342      } 
    323343      ci->timed_out = 0; 
    324344      return 0;