Bug 630092 - fix coverity Defect Type: Resource leaks issues
Summary: fix coverity Defect Type: Resource leaks issues
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Directory Server
Version: 1.2.6
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Nathan Kinder
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
: 603943 (view as bug list)
Depends On:
Blocks: 639035
TreeView+ depends on / blocked
 
Reported: 2010-09-03 17:14 UTC by Nathan Kinder
Modified: 2015-01-04 23:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-17 14:08:32 UTC


Attachments (Terms of Use)
0001-Bug-630092-Coverity-12117-Resource-leaks-issues.patch (998 bytes, patch)
2010-09-16 19:19 UTC, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0002-Bug-630092-Coverity-15478-Resource-leaks-issues.patch (1.15 KB, patch)
2010-09-16 19:20 UTC, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0003-Bug-630092-Coverity-15479-Resource-leaks-issues.patch (1.70 KB, patch)
2010-09-16 19:20 UTC, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0004-Bug-630092-Coverity-15481-Resource-leaks-issues.patch (1.83 KB, patch)
2010-09-16 19:21 UTC, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0005-Bug-630092-Coverity-15482-Resource-leaks-issues.patch (1.50 KB, patch)
2010-09-16 19:21 UTC, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0006-Bug-630092-Coverity-15483-Resource-leaks-issues.patch (1.40 KB, patch)
2010-09-16 19:22 UTC, Endi Sukma Dewata
nhosoi: review+
Details | Diff
0007-Bug-630092-Coverity-15484-Resource-leaks-issues.patch (1.16 KB, patch)
2010-09-16 19:22 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
0008-Bug-630092-Coverity-15485-Resource-leaks-issues.patch (1.04 KB, patch)
2010-09-16 19:23 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
0009-Bug-630092-Coverity-15487-Resource-leaks-issues.patch (1.15 KB, patch)
2010-09-16 19:24 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
0010-Bug-630092-Coverity-15490-Resource-leaks-issues.patch (992 bytes, patch)
2010-09-16 19:24 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
0011-Bug-630092-Coverity-15497-Resource-leaks-issues.patch (924 bytes, patch)
2010-09-16 19:26 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
0005b-Bug-630092-Coverity-15482-Resource-leaks-issues.patch (1.02 KB, patch)
2010-09-17 16:21 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
0007b-Bug-630092-Coverity-15484-Resource-leaks-issues.patch (1.07 KB, patch)
2010-09-17 16:22 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
Patch for cov#12116 (1.40 KB, patch)
2010-09-17 20:35 UTC, Nathan Kinder
edewata: review+
nkinder: review?
Details | Diff
Patch for cov#12105 (874 bytes, patch)
2010-09-17 20:55 UTC, Nathan Kinder
no flags Details | Diff
0001-Bug-630092-Coverity-11985-Resource-leaks-issues.patch (893 bytes, patch)
2010-09-17 21:09 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
0001-Bug-630092-Coverity-11991-Resource-leaks-issues.patch (1.30 KB, patch)
2010-09-17 21:10 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
0001-Bug-630092-Coverity-12000-Resource-leaks-issues.patch (1.15 KB, patch)
2010-09-17 21:10 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
0001-Bug-630092-Coverity-12003-Resource-leaks-issues.patch (863 bytes, patch)
2010-09-17 21:11 UTC, Endi Sukma Dewata
nkinder: review+
Details | Diff
Patch for cov#12068 (908 bytes, patch)
2010-09-17 21:24 UTC, Nathan Kinder
edewata: review+
nkinder: review?
Details | Diff
Revised patch for cov#12105 (1.12 KB, patch)
2010-09-17 21:38 UTC, Nathan Kinder
edewata: review+
Details | Diff
0001-Bug-630092-Coverity-11992-11993-Resource-leaks-issue.patch (923 bytes, patch)
2010-09-17 22:27 UTC, Endi Sukma Dewata
rmeggins: review+
Details | Diff

Description Nathan Kinder 2010-09-03 17:14:44 UTC
fix coverity Defect Type: Memory - Resource leaks issues

Comment 3 Endi Sukma Dewata 2010-09-16 19:19:45 UTC
Created attachment 447832 [details]
0001-Bug-630092-Coverity-12117-Resource-leaks-issues.patch

Comment 4 Endi Sukma Dewata 2010-09-16 19:20:24 UTC
Created attachment 447833 [details]
0002-Bug-630092-Coverity-15478-Resource-leaks-issues.patch

Comment 5 Endi Sukma Dewata 2010-09-16 19:20:47 UTC
Created attachment 447834 [details]
0003-Bug-630092-Coverity-15479-Resource-leaks-issues.patch

Comment 6 Endi Sukma Dewata 2010-09-16 19:21:19 UTC
Created attachment 447835 [details]
0004-Bug-630092-Coverity-15481-Resource-leaks-issues.patch

Comment 7 Endi Sukma Dewata 2010-09-16 19:21:45 UTC
Created attachment 447836 [details]
0005-Bug-630092-Coverity-15482-Resource-leaks-issues.patch

Comment 8 Endi Sukma Dewata 2010-09-16 19:22:10 UTC
Created attachment 447837 [details]
0006-Bug-630092-Coverity-15483-Resource-leaks-issues.patch

Comment 9 Endi Sukma Dewata 2010-09-16 19:22:59 UTC
Created attachment 447838 [details]
0007-Bug-630092-Coverity-15484-Resource-leaks-issues.patch

Comment 10 Endi Sukma Dewata 2010-09-16 19:23:47 UTC
Created attachment 447840 [details]
0008-Bug-630092-Coverity-15485-Resource-leaks-issues.patch

Comment 11 Endi Sukma Dewata 2010-09-16 19:24:09 UTC
Created attachment 447841 [details]
0009-Bug-630092-Coverity-15487-Resource-leaks-issues.patch

Comment 12 Endi Sukma Dewata 2010-09-16 19:24:32 UTC
Created attachment 447842 [details]
0010-Bug-630092-Coverity-15490-Resource-leaks-issues.patch

Comment 13 Endi Sukma Dewata 2010-09-16 19:26:32 UTC
Created attachment 447844 [details]
0011-Bug-630092-Coverity-15497-Resource-leaks-issues.patch

Comment 14 Noriko Hosoi 2010-09-16 21:14:27 UTC
Comment on attachment 447836 [details]
0005-Bug-630092-Coverity-15482-Resource-leaks-issues.patch

The patch solves the problem.  I just want to mention there's no need to introduce another flag free_local_subtree, but you can use "if (is_global)" to tell if local_subtree needs to be freed or not.

Comment 15 Noriko Hosoi 2010-09-16 21:23:57 UTC
Comment on attachment 447838 [details]
0007-Bug-630092-Coverity-15484-Resource-leaks-issues.patch

There's no harm, bug I don't think this line is needed:
+        backentry_clear_entry(ep);      /* entry is released in the frontend on failure*/
since if ep is NULL, backentry_clear_entry does nothing.  If ep->ep_entry is NULL, you don't have to assign NULL again...

Comment 16 Endi Sukma Dewata 2010-09-17 16:21:47 UTC
Created attachment 448050 [details]
0005b-Bug-630092-Coverity-15482-Resource-leaks-issues.patch

Comment 17 Endi Sukma Dewata 2010-09-17 16:22:18 UTC
Created attachment 448051 [details]
0007b-Bug-630092-Coverity-15484-Resource-leaks-issues.patch

Comment 18 Nathan Kinder 2010-09-17 19:24:46 UTC
Pushed patches to master.

Counting objects: 92, done.
Delta compression using 2 threads.
Compressing objects: 100% (77/77), done.
Writing objects: 100% (77/77), 43.72 KiB, done.
Total 77 (delta 61), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   8f1cdb3..2af08b3  master -> master

Comment 19 Nathan Kinder 2010-09-17 20:35:36 UTC
Created attachment 448103 [details]
Patch for cov#12116

Comment 20 Nathan Kinder 2010-09-17 20:55:44 UTC
Created attachment 448107 [details]
Patch for cov#12105

Comment 21 Endi Sukma Dewata 2010-09-17 21:09:54 UTC
Created attachment 448109 [details]
0001-Bug-630092-Coverity-11985-Resource-leaks-issues.patch

Comment 22 Endi Sukma Dewata 2010-09-17 21:10:17 UTC
Created attachment 448110 [details]
0001-Bug-630092-Coverity-11991-Resource-leaks-issues.patch

Comment 23 Endi Sukma Dewata 2010-09-17 21:10:40 UTC
Created attachment 448111 [details]
0001-Bug-630092-Coverity-12000-Resource-leaks-issues.patch

Comment 24 Endi Sukma Dewata 2010-09-17 21:11:15 UTC
Created attachment 448112 [details]
0001-Bug-630092-Coverity-12003-Resource-leaks-issues.patch

Comment 25 Nathan Kinder 2010-09-17 21:24:16 UTC
Created attachment 448125 [details]
Patch for cov#12068

Comment 26 Nathan Kinder 2010-09-17 21:38:45 UTC
Created attachment 448128 [details]
Revised patch for cov#12105

Comment 27 Nathan Kinder 2010-09-17 21:50:30 UTC
Pushed additional patches to master.

Counting objects: 63, done.
Delta compression using 2 threads.
Compressing objects: 100% (45/45), done.
Writing objects: 100% (45/45), 4.52 KiB, done.
Total 45 (delta 35), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   2af08b3..e84ef2e  master -> master

Comment 28 Endi Sukma Dewata 2010-09-17 22:27:11 UTC
Created attachment 448133 [details]
0001-Bug-630092-Coverity-11992-11993-Resource-leaks-issue.patch

Comment 29 Nathan Kinder 2010-09-20 15:15:58 UTC
Pushed patch for cov#11992 and cov#11993 to master.

Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 630 bytes, done.
Total 5 (delta 4), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
   e84ef2e..62cc84c  master -> master

Comment 30 Noriko Hosoi 2010-10-12 00:44:00 UTC
*** Bug 603943 has been marked as a duplicate of this bug. ***

Comment 31 Amita Sharma 2011-05-13 06:59:46 UTC
Coverity Related, Can I request Dev to test this.


Note You need to log in before you can comment on or make changes to this bug.