projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Removed issue around zero length returns now being valid. Fixed memory leak
[m6w6/libmemcached]
/
tests
/
function.c
diff --git
a/tests/function.c
b/tests/function.c
index 03df4da2f6da50cc476510be50c698084937806e..a08e1eaabbf569f333e1c7ca3f44b8056f3c012c 100644
(file)
--- a/
tests/function.c
+++ b/
tests/function.c
@@
-620,6
+620,7
@@
uint8_t read_through(memcached_st *memc)
assert(rc == MEMCACHED_SUCCESS);
assert(string_length == strlen(READ_THROUGH_VALUE));
assert(!strcmp(READ_THROUGH_VALUE, string));
assert(rc == MEMCACHED_SUCCESS);
assert(string_length == strlen(READ_THROUGH_VALUE));
assert(!strcmp(READ_THROUGH_VALUE, string));
+ free(string);
string= memcached_get(memc, key, strlen(key),
&string_length, &flags, &rc);
string= memcached_get(memc, key, strlen(key),
&string_length, &flags, &rc);
@@
-627,6
+628,7
@@
uint8_t read_through(memcached_st *memc)
assert(rc == MEMCACHED_SUCCESS);
assert(string_length == strlen(READ_THROUGH_VALUE));
assert(!strcmp(READ_THROUGH_VALUE, string));
assert(rc == MEMCACHED_SUCCESS);
assert(string_length == strlen(READ_THROUGH_VALUE));
assert(!strcmp(READ_THROUGH_VALUE, string));
+ free(string);
return 0;
}
return 0;
}
@@
-1950,8
+1952,6
@@
uint8_t user_supplied_bug14(memcached_st *memc)
&string_length, &flags, &rc);
assert(rc == MEMCACHED_SUCCESS);
&string_length, &flags, &rc);
assert(rc == MEMCACHED_SUCCESS);
- if (current_length > 0)
- assert(string);
assert(string_length == current_length);
assert(!memcmp(string, value, string_length));
assert(string_length == current_length);
assert(!memcmp(string, value, string_length));