#93159# Fixed rtl_[u]Stringbuffer_newFrom... (double release).

This commit is contained in:
Stephan Bergmann 2001-10-15 07:07:57 +00:00
parent e261767f67
commit f417213e9a
2 changed files with 4 additions and 16 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: strbuf.c,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 15:17:24 $
* last change: $Author: sb $ $Date: 2001-10-15 08:07:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -92,9 +92,6 @@ void SAL_CALL rtl_stringbuffer_newFromStr_WithLength( rtl_String ** newStr,
return;
}
if (*newStr)
rtl_string_release(*newStr);
rtl_string_new_WithLength( newStr, count + 16 );
(*newStr)->length = count;
rtl_copyMemory( (*newStr)->buffer, value, count );
@ -110,9 +107,6 @@ sal_Int32 SAL_CALL rtl_stringbuffer_newFromStringBuffer( rtl_String ** newStr,
{
sal_Int32 newCapacity = capacity;
if (*newStr)
rtl_string_release(*newStr);
if (newCapacity < oldStr->length)
newCapacity = oldStr->length;

View file

@ -2,9 +2,9 @@
*
* $RCSfile: ustrbuf.c,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: jl $ $Date: 2001-03-12 14:03:06 $
* last change: $Author: sb $ $Date: 2001-10-15 08:07:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -92,9 +92,6 @@ void SAL_CALL rtl_uStringbuffer_newFromStr_WithLength( rtl_uString ** newStr,
return;
}
if (*newStr)
rtl_uString_release(*newStr);
rtl_uString_new_WithLength( newStr, count + 16 );
(*newStr)->length = count;
rtl_copyMemory( (*newStr)->buffer, value, count * sizeof(sal_Unicode));
@ -110,9 +107,6 @@ sal_Int32 SAL_CALL rtl_uStringbuffer_newFromStringBuffer( rtl_uString ** newStr,
{
sal_Int32 newCapacity = capacity;
if (*newStr)
rtl_uString_release(*newStr);
if (newCapacity < oldStr->length)
newCapacity = oldStr->length;