~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/row.cc

  • Committer: Brian Aker
  • Date: 2011-12-19 17:01:31 UTC
  • mto: (2478.1.1 drizzle-build)
  • mto: This revision was merged to the branch mainline in revision 2482.
  • Revision ID: brian@tangent.org-20111219170131-kg394kzsdpebm6g6
Mark all cases where you are using realloc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
      return NULL;
105
105
    }
106
106
 
107
 
    result->row= (drizzle_row_t)malloc((sizeof(drizzle_field_t) + sizeof(size_t)) * result->column_count);
 
107
    result->row= (drizzle_row_t)realloc(NULL, (sizeof(drizzle_field_t) + sizeof(size_t)) * result->column_count);
108
108
    if (result->row == NULL)
109
109
    {
110
 
      drizzle_set_error(result->con->drizzle, "drizzle_row_buffer", "malloc");
 
110
      drizzle_set_error(result->con->drizzle, __func__, "Failed to allocate.");
111
111
      *ret_ptr= DRIZZLE_RETURN_MEMORY;
112
112
      return NULL;
113
113
    }