iliaa           Wed Oct  9 09:29:04 2002 EDT

  Modified files:              
    /php4/ext/sybase    php_sybase_db.c 
  Log:
  Fixed memory leaks.
  
  
Index: php4/ext/sybase/php_sybase_db.c
diff -u php4/ext/sybase/php_sybase_db.c:1.37 php4/ext/sybase/php_sybase_db.c:1.38
--- php4/ext/sybase/php_sybase_db.c:1.37        Tue Mar 12 15:18:00 2002
+++ php4/ext/sybase/php_sybase_db.c     Wed Oct  9 09:29:04 2002
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: php_sybase_db.c,v 1.37 2002/03/12 20:18:00 andi Exp $ */
+/* $Id: php_sybase_db.c,v 1.38 2002/10/09 13:29:04 iliaa Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -406,6 +406,7 @@
        /* set a DBLOGIN record */      
        if ((sybase.login=dblogin())==NULL) {
                php_error(E_WARNING,"Sybase:  Unable to allocate login record");
+               efree(hashed_details);
                RETURN_FALSE;
        }
        
@@ -479,6 +480,7 @@
                } else {  /* we do */
                        if (Z_TYPE_P(le) != php_sybase_module.le_plink) {
                                php_error(E_WARNING,"Sybase:  Hashed persistent link 
is not a Sybase link!");
+                               efree(hashed_details);
                                RETURN_FALSE;
                        }
                        
@@ -513,6 +515,7 @@
                        void *ptr;
 
                        if (Z_TYPE_P(index_ptr) != le_index_ptr) {
+                               efree(hashed_details);
                                RETURN_FALSE;
                        }
                        link = (int) index_ptr->ptr;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to