]> granicus.if.org Git - php/commitdiff
- MFH: Fix mem. leak
authorFelipe Pena <felipe@php.net>
Mon, 9 Feb 2009 12:07:35 +0000 (12:07 +0000)
committerFelipe Pena <felipe@php.net>
Mon, 9 Feb 2009 12:07:35 +0000 (12:07 +0000)
ext/pdo_firebird/firebird_statement.c

index 68ebc5916a412963c1dfb435e8e531ae44fec214..76972731e3ffb57dbd2b407d43f06445b3668da1 100644 (file)
@@ -527,6 +527,9 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
                case PDO_PARAM_EVT_ALLOC:
                        if (param->is_param) {
                                /* allocate the parameter */
+                               if (var->sqlind) {
+                                       efree(var->sqlind);
+                               }
                                var->sqlind = (void*)emalloc(var->sqllen + 2*sizeof(short));
                                var->sqldata = &((char*)var->sqlind)[sizeof(short)];
                        }