]> granicus.if.org Git - php/commitdiff
Save memory
authorYasuo Ohgaki <yohgaki@php.net>
Thu, 3 Oct 2002 04:54:01 +0000 (04:54 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Thu, 3 Oct 2002 04:54:01 +0000 (04:54 +0000)
ext/standard/string.c

index f3d08a6bcb6118c8de3d3629a547965b0d15a893..99ba636dca83ed746d160da83a740efd94272c64 100644 (file)
@@ -2468,6 +2468,7 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f
        if (should_free) {
                STR_FREE(str);
        }
+       new_str = (char *) erealloc(new_str, *new_length);
        return new_str;
 }
 /* }}} */