Closed
Bug 536352
Opened 15 years ago
Closed 15 years ago
missed null check and memory leak
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: u367160, Assigned: u367160)
Details
Attachments
(1 file, 1 obsolete file)
1.37 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.16) Gecko/2009121601 Ubuntu/8.10 (intrepid) Firefox/3.0.16 GTB6 Build Identifier: in code of latest trunk http://hg.mozilla.org/mozilla-central: in file config/nsinstall.c 264: dir should be null checked because opendir function may return null. in the same function destdir should be freed before return. Reproducible: Always
proposed patch to fix the null check and memory leak issue
Updated•15 years ago
|
Component: General → Build Config
QA Contact: general → build-config
Attachment #418837 -
Flags: review?(ted.mielczarek)
Comment 2•15 years ago
|
||
Comment on attachment 418837 [details] [diff] [review] proposed patch to fix >diff -r 1f0e04dc2b21 config/nsinstall.c >--- a/config/nsinstall.c Tue Dec 22 09:47:18 2009 +0000 >+++ b/config/nsinstall.c Tue Dec 22 13:07:58 2009 +0200 >@@ -256,17 +256,21 @@ copydir( char *from, char *to, mode_t mo > /* create destination directory */ > destdir = xmalloc((unsigned int)(strlen(to) + 1 + strlen(base) + 1)); > sprintf(destdir, "%s%s%s", to, _DIRECTORY_SEPARATOR, base); > if (mkdirs(destdir, mode) != 0) { > fail("cannot make directory %s\n", destdir); > return; You should probably put a free(destdir) in here for consistency. Otherwise looks fine. If you attach a patch with that change I'll land it for you.
Attachment #418837 -
Flags: review?(ted.mielczarek) → review+
Updated•15 years ago
|
Assignee: nobody → ekrem.tomur
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
patch updated as required, thanks for reviewing
Attachment #418837 -
Attachment is obsolete: true
Attachment #418982 -
Flags: review?(ted.mielczarek)
Updated•15 years ago
|
Attachment #418982 -
Flags: review?(ted.mielczarek) → review+
Comment 4•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/1aa561085c31
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Hardware: x86 → All
Resolution: --- → FIXED
Comment 5•15 years ago
|
||
I forgot to sync with js/src/config initially: http://hg.mozilla.org/mozilla-central/rev/586eea23fcef
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•