OSSP CVS Repository

ossp - Check-in [4177]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4177
Date: 2001-Jul-09 19:18:20 (local)
2001-Jul-09 17:18:20 (UTC)
User:simons
Branch:
Comment: xds_destroy() will now free() an allocated buffer in the xds_context structure.
Tickets:
Inspections:
Files:
ossp-pkg/xds/destroy.c      1.5 -> 1.6     4 inserted, 0 deleted

ossp-pkg/xds/destroy.c 1.5 -> 1.6

--- destroy.c    2001/07/08 15:22:00     1.5
+++ destroy.c    2001/07/09 17:18:20     1.6
@@ -39,6 +39,10 @@
 
     /* Free allocated memory. */
 
+    assert(xds->buffer != NULL || (xds->buffer_capacity == 0 && xds->buffer_len == 0));
+    if (xds->buffer != NULL && xds->we_own_buffer)
+        free(xds->buffer);
+
     assert(xds->engines != NULL || xds->engines_capacity == 0);
     if (xds->engines != NULL)
         free(xds->engines);

CVSTrac 2.0.1