PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
14 Aug 2003, Version 4.3.3RC4
+- Fixed bug #25093 (Various leaks due to non-freed queries). (Ilia)
- Fixed bug #25084 (Make refer check not dependant on register_globals). (Ilia)
- Fixed bug #25081 (odbc_fetch_array() may mangle numeric fields). (Ilia)
- Fixed bug #25044 (header("Location:") changing HTTP status). (Marcus)
case PGRES_NONFATAL_ERROR:
case PGRES_FATAL_ERROR:
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Query failed: %s.", PQerrorMessage(pgsql));
+ PQclear(pgsql_result);
RETURN_FALSE;
break;
case PGRES_COMMAND_OK: /* successful command that did not return rows */
pg_result->row = 0;
ZEND_REGISTER_RESOURCE(return_value, pg_result, le_result);
} else {
+ PQclear(pgsql_result);
RETURN_FALSE;
}
break;
ret = estrdup(tmp_name);
}
}
+ PQclear(result);
}
smart_str_free(&str);
name = PQgetvalue(pg_result,i,0);
add_assoc_zval(meta, name, elem);
}
+ PQclear(pg_result);
return SUCCESS;
}
pg_result = PQexec(pg_link, querystr->c);
if (PQresultStatus(pg_result) == expect) {
+ PQclear(pg_result);
return 0;
} else {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Failed to execute '%s'.", querystr->c);
ret = php_pgsql_result2array(pg_result, ret_array TSRMLS_CC);
} else {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Failed to execute '%s'.", querystr.c);
- PQclear(pg_result);
}
-
+ PQclear(pg_result);
+
cleanup:
if (!(opt & PGSQL_DML_NO_CONV)) {
zval_dtor(ids_converted);