diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index dbb875e88f1..3f511d21456 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1225,15 +1225,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 */