projects
/
awesomized
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
6566056
)
oops! Now I'm using the malloc api, rather than direct malloc
author
Matt Knox
<matthewknox@gmail.com>
Tue, 30 Jun 2009 22:15:14 +0000
(15:15 -0700)
committer
Matt Knox
<matthewknox@gmail.com>
Tue, 30 Jun 2009 22:15:14 +0000
(15:15 -0700)
libmemcached/memcached_response.c
patch
|
blob
|
history
diff --git
a/libmemcached/memcached_response.c
b/libmemcached/memcached_response.c
index e1720f0a5f39f3c1eb2ee12bb02b01b4e5647dc4..61edd1221246f1de726f0e2d8827ba7531ba98d0 100644
(file)
--- a/
libmemcached/memcached_response.c
+++ b/
libmemcached/memcached_response.c
@@
-243,7
+243,7
@@
static memcached_return textual_read_one_response(memcached_server_st *ptr,
char *startptr= buffer + 13, *endptr= startptr;
while (*endptr != '\r' && *endptr != '\n') endptr++;
if (ptr->cached_server_error) free(ptr->cached_server_error);
- ptr->cached_server_error=
malloc(
endptr - startptr + 1);
+ ptr->cached_server_error=
ptr->root->call_malloc(ptr->root,
endptr - startptr + 1);
memcpy(ptr->cached_server_error, startptr, endptr - startptr);
ptr->cached_server_error[endptr - startptr]= 0;
return MEMCACHED_SERVER_ERROR;