If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Memory leak in XRemoteClient::DoSendCommandLine()

RESOLVED FIXED

Status

()

Core
X-remote
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Theo van Klaveren, Assigned: Theo van Klaveren)

Tracking

({mlk})

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a8pre) Gecko/2007082416 Minefield/3.0a8pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a8pre) Gecko/2007082416 Minefield/3.0a8pre

Insubstantial memory leak, but hey. Valgrind reported it, so let's fix it... Patch will follow.

==3941== 90 bytes in 1 blocks are definitely lost in loss record 69 of 125
==3941==    at 0x4021620: malloc (vg_replace_malloc.c:149)
==3941==    by 0x40B5B2F: XRemoteClient::DoSendCommandLine(unsigned long, int, char**, char const*, char**, int*) (XRemoteClient.cpp:728)
==3941==    by 0x40B6D14: XRemoteClient::SendCommandLine(char const*, char const*, char const*, int, char**, char const*, char**, int*) (XRemoteClient.cpp:24
7)
==3941==    by 0x4099C11: RemoteCommandLine(char const*) (nsAppRunner.cpp:1267)
==3941==    by 0x409F718: XRE_main (nsAppRunner.cpp:2763)
==3941==    by 0x8048EF0: main (nsBrowserApp.cpp:153)


Reproducible: Always

Steps to Reproduce:
1. Start firefox with another instance running
2. 
3.
Actual Results:  
Memory leak in calling process.

Expected Results:  
No memory leak.
(Assignee)

Comment 1

10 years ago
Created attachment 278059 [details] [diff] [review]
Fix memory leak in XRemoteClient::DoSendCommandLine()

Updated

10 years ago
Keywords: mlk
Version: unspecified → Trunk
Assignee: nobody → blizzard
Component: OS Integration → X-remote
Product: Firefox → Core
QA Contact: os.integration → blizzard

Updated

10 years ago
Assignee: blizzard → t.vanklaveren
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

10 years ago
Comment on attachment 278059 [details] [diff] [review]
Fix memory leak in XRemoteClient::DoSendCommandLine()

(this is DoSendCommandLine -- DoSendCommand already does free)

please make patches with "cvs diff -u8p" to give more context
Attachment #278059 - Attachment description: Fix memory leak in XRemoteClient::DoSendCommand() → Fix memory leak in XRemoteClient::DoSendCommandLine()
Attachment #278059 - Flags: review?(benjamin)
(Assignee)

Comment 3

10 years ago
Created attachment 278395 [details] [diff] [review]
 Fix memory leak in XRemoteClient::DoSendCommandLine(), v2

This time with diff -u8p.
Attachment #278059 - Attachment is obsolete: true
Attachment #278059 - Flags: review?(benjamin)

Updated

10 years ago
Attachment #278395 - Flags: superreview?(roc)
Attachment #278395 - Flags: review?(roc)
Comment on attachment 278395 [details] [diff] [review]
 Fix memory leak in XRemoteClient::DoSendCommandLine(), v2

it would be better to be using nsAutoArrayPtr here, but we can take this.
Attachment #278395 - Flags: superreview?(roc)
Attachment #278395 - Flags: superreview+
Attachment #278395 - Flags: review?(roc)
Attachment #278395 - Flags: review+
Attachment #278395 - Flags: approval1.9+

Comment 5

10 years ago
landed on trunk.  thanks, Theo.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Summary: Memory leak in XRemoteClient::DoSendCommand() → Memory leak in XRemoteClient::DoSendCommandLine()
You need to log in before you can comment on or make changes to this bug.