Skip to content

Commit 218ff1e

Browse files
fix: freeing the heap after use
1 parent 37e203e commit 218ff1e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/pdo_pgsql/pgsql_statement.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ static int pgsql_stmt_get_attr(pdo_stmt_t *stmt, zend_long attr, zval *val)
719719
spprintf(&tmp, 0, "statement '%s' has not been executed yet", S->stmt_name);
720720

721721
pdo_pgsql_error_stmt_msg(stmt, 0, "HY000", tmp);
722+
efree(tmp);
723+
722724
ZVAL_NULL(val);
723725
}
724726
return 1;

0 commit comments

Comments
 (0)