~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/field.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 Field 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
131
131
 
132
132
  if (result->field_buffer == NULL)
133
133
  {
134
 
    result->field_buffer= (drizzle_field_t)malloc((*total) + 1);
 
134
    result->field_buffer= (drizzle_field_t)realloc(NULL, (*total) +1);
135
135
    if (result->field_buffer == NULL)
136
136
    {
137
 
      drizzle_set_error(result->con->drizzle, "drizzle_field_buffer", "malloc");
 
137
      drizzle_set_error(result->con->drizzle, __func__, "Failed to allocate.");
138
138
      *ret_ptr= DRIZZLE_RETURN_MEMORY;
139
139
      return NULL;
140
140
    }