OSSP CVS Repository

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

Check-in Number: 3203
Date: 2003-Feb-11 09:45:27 (local)
2003-Feb-11 08:45:27 (UTC)
User:rse
Branch:
Comment: fix memory leak in test suite
Tickets:
Inspections:
Files:
ossp-pkg/str/str_test.c      1.26 -> 1.27     9 inserted, 0 deleted

ossp-pkg/str/str_test.c 1.26 -> 1.27

--- str_test.c   2003/01/06 19:13:48     1.26
+++ str_test.c   2003/02/11 08:45:27     1.27
@@ -285,6 +285,15 @@
                          test2_tab[i].r3 == NULL ? "NULL" : test2_tab[i].r3,
                          test2_tab[i].r4 == NULL ? "NULL" : test2_tab[i].r4);
         }
+        if (*(test2_tab[i].p) == 's') {
+            if (r1 != NULL) free(r1);
+        }
+        else {
+            if (r1 != NULL) free(r1);
+            if (r2 != NULL) free(r2);
+            if (r3 != NULL) free(r3);
+            if (r4 != NULL) free(r4);
+        }
     }
     str_parse(NULL, NULL);
     return;

CVSTrac 2.0.1