OSSP CVS Repository

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

Check-in Number: 4246
Date: 2001-Jul-31 08:33:55 (local)
2001-Jul-31 06:33:55 (UTC)
User:simons
Branch:
Comment: Fixed three bugs revealed by RSE's review of the code.
Tickets:
Inspections:
Files:
ossp-pkg/xds/destroy.c      1.6 -> 1.7     8 inserted, 0 deleted
ossp-pkg/xds/setbuffer.c      1.5 -> 1.6     1 inserted, 1 deleted
ossp-pkg/xds/vencode.c      1.11 -> 1.12     1 inserted, 1 deleted

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

--- destroy.c    2001/07/09 17:18:20     1.6
+++ destroy.c    2001/07/31 06:33:55     1.7
@@ -45,7 +45,15 @@
 
     assert(xds->engines != NULL || xds->engines_capacity == 0);
     if (xds->engines != NULL)
+        {
+        size_t i;
+        for (i = 0; i < xds->engines_len; ++i)
+            {
+            assert(xds->engines[i].name != NULL);
+            free(xds->engines[i].name);
+            }
         free(xds->engines);
+        }
 
     free(xds);
     }


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

--- setbuffer.c  2001/07/18 17:49:51     1.5
+++ setbuffer.c  2001/07/31 06:33:55     1.6
@@ -41,7 +41,7 @@
 
     /* Free the old buffer if there is one. */
 
-    if (xds->buffer != NULL)
+    if (xds->buffer != NULL && xds->we_own_buffer)
         free(xds->buffer);
     xds->buffer_len = 0;
 


ossp-pkg/xds/vencode.c 1.11 -> 1.12

--- vencode.c    2001/07/24 15:46:18     1.11
+++ vencode.c    2001/07/31 06:33:55     1.12
@@ -62,7 +62,7 @@
         if (rc != XDS_OK)
             return rc;
         xds->buffer_len    = 0;
-        xds->we_own_buffer = XDS_FALSE;
+        xds->we_own_buffer = XDS_TRUE;
         }
 
     /* Ensure the buffer has free space. */

CVSTrac 2.0.1