]> granicus.if.org Git - php/commitdiff
fix #6552 & #6577
authorThies C. Arntzen <thies@php.net>
Wed, 6 Sep 2000 13:50:09 +0000 (13:50 +0000)
committerThies C. Arntzen <thies@php.net>
Wed, 6 Sep 2000 13:50:09 +0000 (13:50 +0000)
thanx to Blake Schwendiman" <blake@intechra.net>

ext/standard/assert.c

index a7e94b404be9a27c733b84bd751d799ab209335d..facd41548fb02b96fc357ac680e3a71386447574 100644 (file)
@@ -301,12 +301,12 @@ PHP_FUNCTION(assert_options)
                RETVAL_STRING(SAFE_STRING(oldstr),1);
 
                if (ac == 2) {
+                       if (oldstr) {
+                               efree(oldstr);
+                       } 
                        convert_to_string_ex(value);
                        ASSERT(callback) = estrndup((*value)->value.str.val,(*value)->value.str.len);
                }
-               if (oldstr) {
-                       efree(oldstr);
-               } 
                return;
                break;