diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/tablefunc/tablefunc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c index 02e49214101..cd02495c451 100644 --- a/contrib/tablefunc/tablefunc.c +++ b/contrib/tablefunc/tablefunc.c @@ -867,11 +867,8 @@ get_crosstab_tuplestore(char *sql, "tuple has %d columns but crosstab " \ "returns %d.", tupdesc->natts, result_ncols))); - /* allocate space */ - values = (char **) palloc(result_ncols * sizeof(char *)); - - /* and make sure it's clear */ - memset(values, '\0', result_ncols * sizeof(char *)); + /* allocate space and make sure it's clear */ + values = (char **) palloc0(result_ncols * sizeof(char *)); for (i = 0; i < proc; i++) { |