summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-04-20 18:35:37 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-04-20 18:35:37 -0400
commit8fc9dc235b7bbe69b9645b73b91804f37d089350 (patch)
treedad8b79540199371a6da4713bbb05162f757619e /ext
parent7b233a240dbc6b9df65348391de2f61181b12417 (diff)
downloadmongo-8fc9dc235b7bbe69b9645b73b91804f37d089350.tar.gz
We have to reset the return value's buffer pointer after growing it.
Diffstat (limited to 'ext')
-rw-r--r--ext/test/kvs_stec/kvs_stec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/test/kvs_stec/kvs_stec.c b/ext/test/kvs_stec/kvs_stec.c
index 35af93415c5..89fc0766d09 100644
--- a/ext/test/kvs_stec/kvs_stec.c
+++ b/ext/test/kvs_stec/kvs_stec.c
@@ -326,14 +326,14 @@ kvs_call(WT_CURSOR *wt_cursor, const char *fname,
session = cursor->session;
ret = 0;
- /* Set up the return buffer. */
- cursor->record.val = cursor->val;
-
/*
* Call the underlying function; we have to loop because the value
* buffer may need to be grown to accommodate the returned value.
*/
for (;;) {
+ /* Set up the return buffer. */
+ cursor->record.val = cursor->val;
+
if ((ret = f(cursor->data_source->kvs, &cursor->record,
(unsigned long)0, (unsigned long)cursor->val_len)) != 0) {
if (ret == KVS_E_KEY_NOT_FOUND)