Tiny fixes to init_valid_table()
authorVolker Lendecke <vl@samba.org>
Sat, 15 Dec 2007 23:19:42 +0000 (00:19 +0100)
committerJeremy Allison <jra@samba.org>
Sun, 16 Dec 2007 18:57:00 +0000 (10:57 -0800)
(This used to be commit a8948e0727b100945ab730d4d144ccbe219bbc94)

source3/lib/util_unistr.c

index 510f40e6111cb0a3cdf77034364fcac580a67b6e..2949d7d795e8f76f975f1eb4074d41845dfa0743 100644 (file)
@@ -247,14 +247,14 @@ void init_valid_table(void)
         * It might need to be regenerated if the code page changed.
         * We know that we're not using a mapped file, so we can
         * free() the old one. */
-       if (valid_table) 
-               SAFE_FREE(valid_table);
+       SAFE_FREE(valid_table);
 
        /* use free rather than unmap */
        valid_table_use_unmap = False;
 
        DEBUG(2,("creating default valid table\n"));
        valid_table = (uint8 *)SMB_MALLOC(0x10000);
+       SMB_ASSERT(valid_table != NULL);
        for (i=0;i<128;i++) {
                valid_table[i] = isalnum(i) || strchr(allowed,i);
        }