Avoid warning about leaked mem (didn't affect rsync's pool use).
authorWayne Davison <wayned@samba.org>
Tue, 15 Jan 2019 18:40:18 +0000 (10:40 -0800)
committerWayne Davison <wayned@samba.org>
Tue, 15 Jan 2019 18:46:29 +0000 (10:46 -0800)
lib/pool_alloc.c

index 5856d59..a70a3f1 100644 (file)
@@ -49,15 +49,15 @@ pool_create(size_t size, size_t quantum, void (*bomb)(const char *), int flags)
 {
        struct alloc_pool *pool;
 
-       if (!(pool = new0(struct alloc_pool)))
-               return NULL;
-
        if ((MINALIGN & (MINALIGN - 1)) != 0) {
                if (bomb)
                        (*bomb)("Compiler error: MINALIGN is not a power of 2\n");
                return NULL;
        }
 
+       if (!(pool = new0(struct alloc_pool)))
+               return NULL;
+
        if (!size)
                size = POOL_DEF_EXTENT;
        if (!quantum)