git.samba.org
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f233dff
)
Avoid warning about leaked mem (didn't affect rsync's pool use).
author
Wayne Davison
<wayned@samba.org>
Tue, 15 Jan 2019 18:40:18 +0000
(10:40 -0800)
committer
Wayne Davison
<wayned@samba.org>
Tue, 15 Jan 2019 18:46:29 +0000
(10:46 -0800)
lib/pool_alloc.c
patch
|
blob
|
history
diff --git
a/lib/pool_alloc.c
b/lib/pool_alloc.c
index 5856d591f154b19f0d036292a939ac18f0df4b4a..a70a3f1a46b2c0332867f2aef64191ab7c5d1ad9 100644
(file)
--- a/
lib/pool_alloc.c
+++ b/
lib/pool_alloc.c
@@
-49,15
+49,15
@@
pool_create(size_t size, size_t quantum, void (*bomb)(const char *), int flags)
{
struct alloc_pool *pool;
{
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 ((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)
if (!size)
size = POOL_DEF_EXTENT;
if (!quantum)