From d08bd352c14e14dcc0815adefad368d35e86d674 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 10 Mar 2015 23:37:18 +0900 Subject: [PATCH] Use pg_malloc0() instead of malloc() --- config.c | 2 +- repmgr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.c b/config.c index bef2b10d..14df7890 100644 --- a/config.c +++ b/config.c @@ -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")); diff --git a/repmgr.c b/repmgr.c index 86d21737..81bba12c 100644 --- a/repmgr.c +++ b/repmgr.c @@ -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) {