diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 7cf0d5942dc..a2bdda0072c 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1713,7 +1713,9 @@ static void _php_pgsql_free_params(char **params, int num_params) if (num_params > 0) { int i; for (i = 0; i < num_params; i++) { - efree(params[i]); + if (params[i]) { + efree(params[i]); + } } efree(params); }