~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/row.cc

  • Committer: Brian Aker
  • Date: 2011-12-27 20:30:10 UTC
  • mfrom: (2472.1.9 drizzle-build)
  • mto: This revision was merged to the branch mainline in revision 2482.
  • Revision ID: brian@tangent.org-20111227203010-1ymj1ekc2k37bu8s
Merge yacc tree.

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
    }