~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/result.c

  • Committer: Olaf van der Spek
  • Date: 2011-02-23 22:07:43 UTC
  • mto: (2197.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2198.
  • Revision ID: olafvdspek@gmail.com-20110223220743-oxj0mq05dbkf2q6a
Avoid null pointer usage

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
    free(result->field_sizes_list);
119
119
  }
120
120
 
121
 
  if (result->con->result_list == result)
122
 
    result->con->result_list= result->next;
 
121
  if (result->con)
 
122
  {
 
123
    result->con->result_count--;
 
124
    if (result->con->result_list == result)
 
125
      result->con->result_list= result->next;
 
126
  }
123
127
  if (result->prev)
124
128
    result->prev->next= result->next;
125
129
  if (result->next)
126
130
    result->next->prev= result->prev;
127
 
  result->con->result_count--;
128
131
 
129
132
  if (result->options & DRIZZLE_RESULT_ALLOCATED)
130
133
    free(result);