Author: idra
Date: 2007-08-21 18:45:45 +0000 (Tue, 21 Aug 2007)
New Revision: 24603

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24603

Log:

In case of error we need to free prefix_cache otherwise on re-init the first
statement will return positively but prefix_cache_hashes would be NULL


Modified:
   branches/SAMBA_3_2/source/smbd/mangle_hash2.c
   branches/SAMBA_3_2_0/source/smbd/mangle_hash2.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/mangle_hash2.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/mangle_hash2.c       2007-08-21 14:47:15 UTC 
(rev 24602)
+++ branches/SAMBA_3_2/source/smbd/mangle_hash2.c       2007-08-21 18:45:45 UTC 
(rev 24603)
@@ -163,6 +163,7 @@
 
        prefix_cache_hashes = SMB_CALLOC_ARRAY(unsigned int, MANGLE_CACHE_SIZE);
        if (!prefix_cache_hashes) {
+               SAFE_FREE(prefix_cache);
                return False;
        }
 

Modified: branches/SAMBA_3_2_0/source/smbd/mangle_hash2.c
===================================================================
--- branches/SAMBA_3_2_0/source/smbd/mangle_hash2.c     2007-08-21 14:47:15 UTC 
(rev 24602)
+++ branches/SAMBA_3_2_0/source/smbd/mangle_hash2.c     2007-08-21 18:45:45 UTC 
(rev 24603)
@@ -163,6 +163,7 @@
 
        prefix_cache_hashes = SMB_CALLOC_ARRAY(unsigned int, MANGLE_CACHE_SIZE);
        if (!prefix_cache_hashes) {
+               SAFE_FREE(prefix_cache);
                return False;
        }
 

Reply via email to