Use pg_malloc0() instead of malloc()

This commit is contained in:
Ian Barwick
2015-03-10 23:37:18 +09:00
parent 53b990c65d
commit d08bd352c1
2 changed files with 2 additions and 2 deletions

View File

@@ -579,7 +579,7 @@ tablespace_list_append(t_configuration_options *options, const char *arg)
char *dst_ptr;
const char *arg_ptr;
cell = (TablespaceListCell *) malloc(sizeof(TablespaceListCell));
cell = (TablespaceListCell *) pg_malloc0(sizeof(TablespaceListCell));
if(cell == NULL)
{
log_err(_("unable to allocate memory. Terminating.\n"));

View File

@@ -2967,7 +2967,7 @@ error_list_append(char *error_message)
{
ErrorListCell *cell;
cell = (ErrorListCell *) malloc(sizeof(ErrorListCell));
cell = (ErrorListCell *) pg_malloc0(sizeof(ErrorListCell));
if(cell == NULL)
{