]> granicus.if.org Git - php/commitdiff
Fixed smart_str_setl
authorXinchen Hui <laruence@gmail.com>
Sun, 30 Mar 2014 09:50:42 +0000 (17:50 +0800)
committerXinchen Hui <laruence@gmail.com>
Sun, 30 Mar 2014 09:50:42 +0000 (17:50 +0800)
ext/standard/php_smart_str.h

index e11eb734ed7ac944778f993e66f5afebdd6ebe76..a518fbfddfd080a0ebf748edae3be61f74002fed 100644 (file)
@@ -185,8 +185,8 @@ static inline char *smart_str_print_unsigned(char *buf, long num) {
        smart_str_appendl_ex((dest), ((smart_str *)(src))->s->val,              \
                ((smart_str *)(src))->s->len, (what));
 
-
 #define smart_str_setl(dest, src, nlen) do {                                           \
+       smart_str_free((dest));                                                                                 \
        smart_str_appendl_ex((dest), (src), (nlen), 0);                                 \
 } while (0)