OSSP CVS Repository

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

Check-in Number: 3185
Date: 2003-Feb-09 22:39:17 (local)
2003-Feb-09 21:39:17 (UTC)
User:mlelstv
Branch:
Comment: fix memory leak. align code with other modules
Tickets:
Inspections:
Files:
ossp-pkg/sio/sio_fd.c      1.14 -> 1.15     4 inserted, 2 deleted
ossp-pkg/sio/sio_sa.c      1.8 -> 1.9     4 inserted, 0 deleted

ossp-pkg/sio/sio_fd.c 1.14 -> 1.15

--- sio_fd.c     2003/02/09 19:57:22     1.14
+++ sio_fd.c     2003/02/09 21:39:17     1.15
@@ -111,8 +111,10 @@
 static
 sio_rc_t fd_cleanup(sio_t *sio, void *u)
 {
-    if (u != NULL)
-        free(u);
+    private_t *my = (private_t *)u;
+
+    free(my);
+
     return SIO_OK;
 }
 


ossp-pkg/sio/sio_sa.c 1.8 -> 1.9

--- sio_sa.c     2003/01/20 19:12:54     1.8
+++ sio_sa.c     2003/02/09 21:39:17     1.9
@@ -120,6 +120,10 @@
 static
 sio_rc_t saw_cleanup(sio_t *sio, void *u)
 {
+    private_t *my = (private_t *)u;
+
+    free(my);
+
     return SIO_OK;
 }
 

CVSTrac 2.0.1