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) {