summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index feb53b6dcd..aca9fec5d5 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -1201,7 +1201,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);
}