diff options
author | Andrey Hristov <andrey@php.net> | 2010-10-07 13:49:00 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-10-07 13:49:00 +0000 |
commit | 2d2d6f84baa33433b42e1dce9c9e53960b048970 (patch) | |
tree | 5113d75c059ee1986f741bb4579d203d99f59bbd /ext/mysqlnd/mysqlnd_loaddata.c | |
parent | a4252ab2be8a0231477396fd475397b23a089d0e (diff) | |
download | php-git-2d2d6f84baa33433b42e1dce9c9e53960b048970.tar.gz |
fix some uninitialized variables. also fix shadowing of global symbols
Diffstat (limited to 'ext/mysqlnd/mysqlnd_loaddata.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_loaddata.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd_loaddata.c b/ext/mysqlnd/mysqlnd_loaddata.c index 516886d2d4..4623898248 100644 --- a/ext/mysqlnd/mysqlnd_loaddata.c +++ b/ext/mysqlnd/mysqlnd_loaddata.c @@ -173,7 +173,7 @@ static const char *lost_conn = "Lost connection to MySQL server during LOAD DATA enum_func_status mysqlnd_handle_local_infile(MYSQLND *conn, const char *filename, zend_bool *is_warning TSRMLS_DC) { - char *buf; + char *buf = NULL; char empty_packet[MYSQLND_HEADER_SIZE]; enum_func_status result = FAIL; unsigned int buflen = 4096; @@ -244,7 +244,9 @@ infile_error: } (*conn->infile.local_infile_end)(info TSRMLS_CC); - mnd_efree(buf); + if (buf) { + mnd_efree(buf); + } DBG_INF_FMT("%s", result == PASS? "PASS":"FAIL"); DBG_RETURN(result); } |