[sldev] @Linden / Potential memory leak / VWR-794
Nicholaz Beresford
nicholaz at blueflash.cc
Tue May 22 18:06:52 PDT 2007
I just saw VWR-794 fixed by Sardonyx, but there is a similar issue in
llviewerpartsource.cpp (I had posted that as part of a larger patch in
VWR-364)
Nick
#####################################################################################################
# XP [W:/sl1.15.1.3]c:/cygwin/bin/udiff -u
linden-orig/indra/newview/llviewerpartsource.cpp
linden/indra/newview/llviewerpartsource.
cpp
#
--- linden-orig/indra/newview/llviewerpartsource.cpp 2007-05-14
16:47:28.000000000 +0200
+++ linden/indra/newview/llviewerpartsource.cpp 2007-05-17
19:30:31.187500000 +0200
@@ -322,7 +322,8 @@
LLViewerPartSourceScript *new_pssp = new
LLViewerPartSourceScript(source_objp);
if (!new_pssp->mPartSysData.unpackBlock(block_num))
{
- return NULL;
+ delete new_pssp; // !!! potential memory leak fixed (loss of
new_pssp) [Nicholaz Beresford]
+ return NULL;
}
if (new_pssp->mPartSysData.mTargetUUID.notNull())
{
@@ -360,7 +361,8 @@
LLViewerPartSourceScript *new_pssp = new
LLViewerPartSourceScript(source_objp);
if (!new_pssp->mPartSysData.unpack(dp))
{
- return NULL;
+ delete new_pssp; // !!! potential memory leak fixed (loss of
new_pssp) [Nicholaz Beresford]
+ return NULL;
}
if (new_pssp->mPartSysData.mTargetUUID.notNull())
{
More information about the SLDev
mailing list