diff options
author | Frank M. Kromann <fmk@php.net> | 2003-12-02 18:38:30 +0000 |
---|---|---|
committer | Frank M. Kromann <fmk@php.net> | 2003-12-02 18:38:30 +0000 |
commit | a7e2f95247930d12ce4fceff027e1bf1888b7c8e (patch) | |
tree | 65715346c95066cc069f4a7c7ef8bccc4e7f8b2d /ext/mssql/php_mssql.c | |
parent | 4f51656de9042099deafdb2aca878d8369527d7e (diff) | |
download | php-git-a7e2f95247930d12ce4fceff027e1bf1888b7c8e.tar.gz |
set freed pointer to null to avoid reuse
Diffstat (limited to 'ext/mssql/php_mssql.c')
-rw-r--r-- | ext/mssql/php_mssql.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index cf69cb911a..3e1fd5534a 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -164,6 +164,7 @@ static int php_mssql_message_handler(DBPROCESS *dbproc, DBINT msgno,int msgstate } if (MS_SQL_G(server_message)) { STR_FREE(MS_SQL_G(server_message)); + MS_SQL_G(server_message) = NULL; } MS_SQL_G(server_message) = estrdup(msgtext); return 0; @@ -347,6 +348,7 @@ PHP_RSHUTDOWN_FUNCTION(mssql) STR_FREE(MS_SQL_G(appname)); if (MS_SQL_G(server_message)) { STR_FREE(MS_SQL_G(server_message)); + MS_SQL_G(server_message) = NULL; } return SUCCESS; } |