Fix error in osmcallback hook

The callback hook should use the old pointer instead of the new.
This causes a segfault when ptr is NULL.
This commit is contained in:
gayyappan 2023-09-21 11:04:08 -04:00 committed by gayyappan
parent 683e2bcf18
commit 887f538cd7
2 changed files with 2 additions and 1 deletions

1
.unreleased/PR_6106 Normal file
View File

@ -0,0 +1 @@
Fixes: #6106 incorrect pointer usage in OSM hook callback

View File

@ -61,7 +61,7 @@ ts_get_osm_hypertable_drop_hook()
{
OsmCallbacks *ptr_old = ts_get_osm_callbacks_old();
if (ptr_old)
return ptr->hypertable_drop_hook;
return ptr_old->hypertable_drop_hook;
}
return NULL;
}