Description
4 new coverity issues have been reported, ID's 1375904-1375907
4 new defect(s) introduced to WiredTiger found with Coverity Scan.
|
|
|
New defect(s) Reported-by: Coverity Scan
|
Showing 4 of 4 defect(s)
|
|
|
** CID 1375907: Resource leaks (RESOURCE_LEAK)
|
/src/btree/row_modify.c: 23 in __wt_page_modify_alloc()
|
|
|
________________________________________________________________________________________________________
|
*** CID 1375907: Resource leaks (RESOURCE_LEAK)
|
/src/btree/row_modify.c: 23 in __wt_page_modify_alloc()
|
17 {
|
18 WT_PAGE_MODIFY *modify;
|
19
|
20 WT_RET(__wt_calloc_one(session, &modify));
|
21
|
22 /* Initialize the spinlock for the page. */
|
>>> CID 1375907: Resource leaks (RESOURCE_LEAK)
|
>>> Variable "modify" going out of scope leaks the storage it points to.
|
23 WT_RET(__wt_spin_init(session, &modify->page_lock, "btree page"));
|
24
|
25 /*
|
26 * Multiple threads of control may be searching and deciding to modify
|
27 * a page. If our modify structure is used, update the page's memory
|
28 * footprint, else discard the modify structure, another thread did the
|
|
** CID 1375906: Control flow issues (MISSING_RESTORE)
|
/src/lsm/lsm_work_unit.c: 393 in __wt_lsm_checkpoint_chunk()
|
|
|
________________________________________________________________________________________________________
|
*** CID 1375906: Control flow issues (MISSING_RESTORE)
|
/src/lsm/lsm_work_unit.c: 393 in __wt_lsm_checkpoint_chunk()
|
387 WT_ERR(__wt_lsm_manager_push_entry(
|
388 session, WT_LSM_WORK_BLOOM, 0, lsm_tree));
|
389 else
|
390 WT_ERR(__wt_lsm_manager_push_entry(
|
391 session, WT_LSM_WORK_MERGE, 0, lsm_tree));
|
392
|
>>> CID 1375906: Control flow issues (MISSING_RESTORE)
|
>>> Jumped to here, skipping restore.
|
393 err: if (flush_set)
|
394 WT_PUBLISH(chunk->flushing, 0);
|
395 if (release_btree)
|
396 WT_TRET(__wt_session_release_btree(session));
|
397
|
398 return (ret);
|
|
** CID 1375905: Resource leaks (RESOURCE_LEAK)
|
/src/lsm/lsm_tree.c: 475 in __lsm_tree_open()
|
|
|
________________________________________________________________________________________________________
|
*** CID 1375905: Resource leaks (RESOURCE_LEAK)
|
/src/lsm/lsm_tree.c: 475 in __lsm_tree_open()
|
469 if ((ret = __lsm_tree_find(
|
470 session, uri, exclusive, treep)) != WT_NOTFOUND)
|
471 return (ret);
|
472
|
473 /* Try to open the tree. */
|
474 WT_RET(__wt_calloc_one(session, &lsm_tree));
|
>>> CID 1375905: Resource leaks (RESOURCE_LEAK)
|
>>> Variable "lsm_tree" going out of scope leaks the storage it points to.
|
475 WT_RET(__wt_rwlock_init(session, &lsm_tree->rwlock));
|
476
|
477 WT_ERR(__lsm_tree_set_name(session, lsm_tree, uri));
|
478
|
479 WT_ERR(__wt_lsm_meta_read(session, lsm_tree));
|
480
|
|
** CID 1375904: (LOCK)
|
/src/btree/bt_split.c: 1202 in __split_internal_lock()
|
/src/btree/bt_split.c: 1202 in __split_internal_lock()
|
|
|
________________________________________________________________________________________________________
|
*** CID 1375904: (LOCK)
|
/src/btree/bt_split.c: 1202 in __split_internal_lock()
|
1196 if (!__wt_ref_is_root(parent_ref = parent->pg_intl_parent_ref)) {
|
1197 WT_ERR(__wt_page_in(session, parent_ref, WT_READ_NO_EVICT));
|
1198 *hazardp = true;
|
1199 }
|
1200
|
1201 *parentp = parent;
|
>>> CID 1375904: (LOCK)
|
>>> Returning without unlocking "parent->modify->page_lock.lock".
|
1202 return (0);
|
1203
|
1204 err: WT_PAGE_UNLOCK(session, parent);
|
1205 return (ret);
|
1206 }
|
1207
|
/src/btree/bt_split.c: 1202 in __split_internal_lock()
|
1196 if (!__wt_ref_is_root(parent_ref = parent->pg_intl_parent_ref)) {
|
1197 WT_ERR(__wt_page_in(session, parent_ref, WT_READ_NO_EVICT));
|
1198 *hazardp = true;
|
1199 }
|
1200
|
1201 *parentp = parent;
|
>>> CID 1375904: (LOCK)
|
>>> Returning without unlocking "parent->modify->page_lock.lock".
|
1202 return (0);
|
1203
|
1204 err: WT_PAGE_UNLOCK(session, parent);
|
1205 return (ret);
|
1206 }
|
1207
|