The CVS tree is unstable right now.  Here's *one* patch, more needed.
(Note to the curious: everything allocated with "new []" *must*
be deleted with "delete []", regardless if it's just a "new char [1]".)

Wed Jan  6 14:52:11 1999  Hans-Peter Nilsson  <[EMAIL PROTECTED]>

        * htlib/String.cc (allocate_space): Add missing [] to delete.


Index: String.cc
===================================================================
RCS file: /opt/htdig/cvs/htdig3/htlib/String.cc,v
retrieving revision 1.11
diff -p -c -r1.11 String.cc
*** String.cc   1998/12/19 14:39:41     1.11
--- String.cc   1999/01/06 13:51:05
*************** void String::allocate_space(int len)
*** 569,575 ****
      if (Data)
      {
        if (len > Allocated)
!           delete Data;
        else
            return;             // No need to allocate space.
      }
--- 569,575 ----
      if (Data)
      {
        if (len > Allocated)
!           delete [] Data;
        else
            return;             // No need to allocate space.
      }

brgds, H-P
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the body of the message.

Reply via email to