OSSP CVS Repository

ossp - Difference in ossp-pkg/cfg/cfg_fmt.c versions 1.8 and 1.9
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/cfg/cfg_fmt.c 1.8 -> 1.9

--- cfg_fmt.c    2005/01/24 14:18:48     1.8
+++ cfg_fmt.c    2005/02/03 10:32:08     1.9
@@ -1157,8 +1157,10 @@
     if ((s = malloc(rv+1)) == NULL)
         return NULL;
     va_copy(ap, apbak);
-    if ((rv = cfg_fmt_vsprintf(s, rv+1, fmt, ap)) == -1)
+    if ((rv = cfg_fmt_vsprintf(s, rv+1, fmt, ap)) == -1) {
+        free(s);
         return NULL;
+    }
     return s;
 }
 

CVSTrac 2.0.1