OSSP CVS Repository

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

Check-in Number: 3199
Date: 2003-Feb-10 22:12:47 (local)
2003-Feb-10 21:12:47 (UTC)
User:rse
Branch:
Comment: fix final memory leak
Tickets:
Inspections:
Files:
ossp-pkg/var/var.c      1.94 -> 1.95     6 inserted, 1 deleted

ossp-pkg/var/var.c 1.94 -> 1.95

--- var.c        2003/02/10 20:50:53     1.94
+++ var.c        2003/02/10 21:12:47     1.95
@@ -1626,11 +1626,16 @@
                                               arg_ptr, arg_len,
                                               val_ptr, val_len,
                                               &out_ptr, &out_len, &out_size);
-                if (rc < 0)
+                if (rc < 0) {
+                    if (arg_ptr != NULL)
+                        free(arg_ptr);
                     goto error_return;
+                }
                 tokenbuf_free(data);
                 tokenbuf_set(data, out_ptr, out_ptr+out_len, out_size);
             }
+            if (arg_ptr != NULL)
+                free(arg_ptr);
             break;
         }
         default:

CVSTrac 2.0.1