]> granicus.if.org Git - php/commitdiff
fix couple of leaks in MySQLi
authorAntony Dovgal <tony2001@php.net>
Mon, 27 Jun 2005 17:33:56 +0000 (17:33 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 27 Jun 2005 17:33:56 +0000 (17:33 +0000)
ext/mysqli/mysqli_exception.c
ext/mysqli/mysqli_nonapi.c

index bd90560c84d01f15573d76346829c337ca5c1e8f..adb6b2f2eb27210ab9d94936e43b72fd16edb8bb 100644 (file)
@@ -47,6 +47,7 @@ void php_mysqli_throw_sql_exception(char *sqlstate, int errorno TSRMLS_DC, char
 
        if (!(MyG(report_mode) & MYSQLI_REPORT_STRICT)) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "(%s/%d): %s", sqlstate, errorno, message);
+               efree(message);
                return;
        }
 
index 683638b8e991a80d12237c3906f2ae5eafea0ef4..1ed6278e2caccec3d52a650f2769a1320c7fd496 100644 (file)
@@ -97,6 +97,7 @@ PHP_FUNCTION(mysqli_connect)
 
                /* free mysql structure */
                mysql_close(mysql->mysql);
+               efree(mysql);
                RETURN_FALSE;
        }