diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-07-10 20:21:18 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-07-10 20:21:18 +0200 |
commit | e44fefc7b395279b9682321f952490ab9d1d01f0 (patch) | |
tree | 620b90cde4a5c1e05c8225eea14363d737b15c48 /mysys/string.c | |
parent | 49501b4ccb923475f259cccf66b90e8c6a5ed0ee (diff) | |
download | mariadb-git-e44fefc7b395279b9682321f952490ab9d1d01f0.tar.gz |
adding DBUG_ENTER/DBUG_RETURN tags that were useful when fixing memory leaks
Diffstat (limited to 'mysys/string.c')
-rw-r--r-- | mysys/string.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mysys/string.c b/mysys/string.c index b1eded0664c..0aa175e8991 100644 --- a/mysys/string.c +++ b/mysys/string.c @@ -98,20 +98,21 @@ my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, size_t length) { char *new_ptr; + DBUG_ENTER("dynstr_append_mem"); if (str->length+length >= str->max_length) { size_t new_length=(str->length+length+str->alloc_increment)/ str->alloc_increment; new_length*=str->alloc_increment; if (!(new_ptr=(char*) my_realloc(str->str,new_length,MYF(MY_WME)))) - return TRUE; + DBUG_RETURN(TRUE); str->str=new_ptr; str->max_length=new_length; } memcpy(str->str + str->length,append,length); str->length+=length; str->str[str->length]=0; /* Safety for C programs */ - return FALSE; + DBUG_RETURN(FALSE); } |