~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/row.cc

  • Committer: Mark Atwood
  • Date: 2011-12-30 22:59:59 UTC
  • mfrom: (2478.1.3 drizzle-build)
  • Revision ID: me@mark.atwood.name-20111230225959-m3wdvqiymv3a4q2w
mergeĀ lp:~brianaker/drizzle/yacc-merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 * @brief Row definitions
41
41
 */
42
42
 
43
 
#include <libdrizzle-1.0/common.h>
 
43
#include <libdrizzle/common.h>
44
44
 
45
45
/*
46
46
 * Client definitions
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
    }