SQLite4
Check-in [11ac1783f7]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a memory leak in lsm_tree.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | multi-process
Files: files | file ages | folders
SHA1: 11ac1783f705e53507da036b80cc461054616cf9
User & Date: dan 2012-08-25 20:24:43
Context
2012-08-28
16:50
Fix an OOB read caused by an implicit UNIQUE index on the same columns as the primary key of a table. check-in: 57b62e32f6 user: dan tags: multi-process
2012-08-25
20:24
Fix a memory leak in lsm_tree.c. check-in: 11ac1783f7 user: dan tags: multi-process
20:05
Fix other problems revealed by src4.test. check-in: bfa27bab8a user: dan tags: multi-process
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/lsm_tree.c.

1056
1057
1058
1059
1060
1061
1062

1063
1064
1065
1066
1067
1068
1069
      int iSlot = csr.aiCell[csr.iNode] + (res<0);
      if( csr.iNode==0 ){
        rc = treeInsert(pDb, &csr, 0, iTreeKey, 0, iSlot);
      }else{
        rc = treeInsertLeaf(pDb, &csr, iTreeKey, iSlot);
      }
    }

  }

#if 0
  dump_tree_contents(pDb, "after");
#endif
  assert_tree_looks_ok(rc, pTree);
  return rc;







>







1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
      int iSlot = csr.aiCell[csr.iNode] + (res<0);
      if( csr.iNode==0 ){
        rc = treeInsert(pDb, &csr, 0, iTreeKey, 0, iSlot);
      }else{
        rc = treeInsertLeaf(pDb, &csr, iTreeKey, iSlot);
      }
    }
    tblobFree(pDb, &csr.blob);
  }

#if 0
  dump_tree_contents(pDb, "after");
#endif
  assert_tree_looks_ok(rc, pTree);
  return rc;