summaryrefslogtreecommitdiff
path: root/sal/osl/w32/pipe.c
diff options
context:
space:
mode:
authorTino Rachui <tra@openoffice.org>2001-07-09 08:18:53 +0000
committerTino Rachui <tra@openoffice.org>2001-07-09 08:18:53 +0000
commitbf6c7416427602ba973916c7bdf438eb57eec380 (patch)
tree32606e6b8749756e039a0b40e09c7c81bb00526d /sal/osl/w32/pipe.c
parent60d94f828c3bb1a0467913a76591188b90890b50 (diff)
#89386#fixed memory leak in osl_createPipe, two strings (name,path) were allocated but not released before, now they will
Diffstat (limited to 'sal/osl/w32/pipe.c')
-rw-r--r--sal/osl/w32/pipe.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/sal/osl/w32/pipe.c b/sal/osl/w32/pipe.c
index f4740a39095d..7cb22b2d12fa 100644
--- a/sal/osl/w32/pipe.c
+++ b/sal/osl/w32/pipe.c
@@ -2,9 +2,9 @@
*
* $RCSfile: pipe.c,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: dic $ $Date: 2001-06-26 13:25:54 $
+ * last change: $Author: tra $ $Date: 2001-07-09 09:18:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -528,7 +528,12 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options
pPipe->m_Security);
if (pPipe->m_File != INVALID_HANDLE_VALUE)
+ {
+ rtl_uString_release( name );
+ rtl_uString_release( path );
+
return pPipe;
+ }
}
else
{
@@ -552,6 +557,9 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options
/* wait for thread start ups */
osl_waitCondition(pPipe->m_ThreadStartUpCond, NULL);
+ rtl_uString_release( name );
+ rtl_uString_release( path );
+
return (pPipe);
}
else
@@ -575,7 +583,12 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
NULL)) != INVALID_HANDLE_VALUE)
+ {
+ rtl_uString_release( name );
+ rtl_uString_release( path );
+
return (pPipe);
+ }
}
else
{
@@ -596,6 +609,9 @@ oslPipe SAL_CALL osl_createPipe(rtl_uString *strPipeName, oslPipeOptions Options
/* wait for creation */
osl_acquireSemaphore(pPipe->m_Acception);
+ rtl_uString_release( name );
+ rtl_uString_release( path );
+
return (pPipe);
}
else