~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/replicator.cc

  • Committer: Mark Atwood
  • Date: 2008-12-16 00:06:22 UTC
  • mto: This revision was merged to the branch mainline in revision 689.
  • Revision ID: me@mark.atwood.name-20081216000622-yui4zeuclsgz3xej
use new/delete instead of malloc/free for plugin structs

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
{
27
27
  replicator_t *p;
28
28
 
29
 
  p= (replicator_t *) malloc(sizeof(replicator_t));
 
29
  p= new replicator_t;
30
30
  if (p == NULL) return 1;
31
31
  memset(p, 0, sizeof(replicator_t));
32
32
 
46
46
  return 0;
47
47
 
48
48
 err:
49
 
  free(p);
 
49
  delete p;
50
50
  return 1;
51
51
}
52
52
 
65
65
        }
66
66
    }
67
67
 
68
 
  if (p) free(p);
 
68
  if (p) delete p;
69
69
 
70
70
  return 0;
71
71
}