diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 1d7fee601700..e8fb99c7aca4 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1057,15 +1057,13 @@ PHP_FUNCTION(pg_query) static void _php_pgsql_free_params(char **params, int num_params) { - if (num_params > 0) { - int i; - for (i = 0; i < num_params; i++) { - if (params[i]) { - efree(params[i]); - } + int i; + for (i = 0; i < num_params; i++) { + if (params[i]) { + efree(params[i]); } - efree(params); } + efree(params); } /* Execute a query */