]> granicus.if.org Git - php/commitdiff
(php_setlocale) Fixed memory leak (bug #3105).
authorJouni Ahto <jah@php.net>
Wed, 5 Jan 2000 12:26:41 +0000 (12:26 +0000)
committerJouni Ahto <jah@php.net>
Wed, 5 Jan 2000 12:26:41 +0000 (12:26 +0000)
# Must have been thinking something else when originally wrote this.

ext/standard/string.c

index cb3a1e0ef7ee0efd72bfd752a852cbddb338d3b0..f199c03b55796ed40689b4abd7d404ecd3a2a4d3 100644 (file)
@@ -2099,7 +2099,7 @@ PHP_FUNCTION(setlocale)
                /* Remember if locale was changed */
                if (loc) {
                        STR_FREE(BG(locale_string));
-                       BG(strtok_string) = estrdup(retval);
+                       BG(locale_string) = estrdup(retval);
                }
 
                RETVAL_STRING(retval,1);