From: Tom Lane Date: Fri, 18 Jul 2008 04:20:24 +0000 (+0000) Subject: Suppress compiler warning, and not incidentally make the code more X-Git-Tag: recoveryinfrav9~804 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=2be79e5ffec190bbbb9260378fe0589929bf6ab0;p=users%2Fsimon%2Fpostgres.git Suppress compiler warning, and not incidentally make the code more robust. The previous coding was quite risky because it was testing conditions different from 'is the array really allocated?'. --- diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 369b6abe33..900130d6eb 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1591,14 +1591,14 @@ error_return: termPQExpBuffer(&title); termPQExpBuffer(&tmpbuf); - if (tableinfo.relkind == 'S') + if (seq_values) { for (ptr = seq_values; *ptr; ptr++) free(*ptr); free(seq_values); } - if (show_modifiers) + if (modifiers) { for (ptr = modifiers; *ptr; ptr++) free(*ptr);