Skip to content

Commit e596a9d

Browse files
committed
call post_initialize only for ops >= 1.1
1 parent ee59e5a commit e596a9d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/memory_provider.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,15 @@ void assignOpsIpcDefaults(umf_memory_provider_ops_t *ops) {
230230

231231
static umf_result_t umfProviderPostInitialize(umf_memory_provider_ops_t *ops,
232232
void *provider_priv, ...) {
233+
234+
// "post_initialize" ctl query is supported since version 1.1
235+
if (ops->version < UMF_MAKE_VERSION(1, 1)) {
236+
LOG_DEBUG("post_initialize ctl query is not supported in version %d - "
237+
"skipping",
238+
ops->version);
239+
return UMF_RESULT_ERROR_INVALID_CTL_PATH;
240+
}
241+
233242
va_list args;
234243
va_start(args, provider_priv);
235244
umf_result_t ret =

0 commit comments

Comments
 (0)