Skip to content

Commit 73d92d9

Browse files
committed
[Common] fix parseDisjointPoolConfig
returning {} when EnableBuffers is false means returning a defult-constructed DisjointPoolAllConfigs struct which has EnableBuffers set to 1. Fix this by always returning properly constructed DisjointPoolAllConfigs.
1 parent f47d1b6 commit 73d92d9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

source/common/umf_pools/disjoint_pool_config_parser.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ DisjointPoolAllConfigs parseDisjointPoolConfig(const std::string &config,
215215
}
216216
}
217217

218+
AllConfigs.EnableBuffers = EnableBuffers;
219+
218220
AllConfigs.limits = std::shared_ptr<umf_disjoint_pool_shared_limits_t>(
219221
umfDisjointPoolSharedLimitsCreate(MaxSize),
220222
umfDisjointPoolSharedLimitsDestroy);
@@ -224,10 +226,6 @@ DisjointPoolAllConfigs parseDisjointPoolConfig(const std::string &config,
224226
Config.PoolTrace = trace;
225227
}
226228

227-
if (!EnableBuffers) {
228-
return {};
229-
}
230-
231229
if (!trace) {
232230
return AllConfigs;
233231
}

0 commit comments

Comments
 (0)