mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-15 10:11:29 +08:00
Make tablespace_show
function return Name instead of CString
Fixes a memory bug found by valgrind.
This commit is contained in:
parent
2fe447ba14
commit
26971d2d1d
@ -510,8 +510,12 @@ tablespace_show(PG_FUNCTION_ARGS)
|
||||
{
|
||||
Oid tablespace_oid = tspcs->tablespaces[funcctx->call_cntr].tablespace_oid;
|
||||
const char *tablespace_name = get_tablespace_name(tablespace_oid);
|
||||
Datum name;
|
||||
|
||||
SRF_RETURN_NEXT(funcctx, CStringGetDatum(tablespace_name));
|
||||
Assert(tablespace_name != NULL);
|
||||
name = DirectFunctionCall1(namein, CStringGetDatum(tablespace_name));
|
||||
|
||||
SRF_RETURN_NEXT(funcctx, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user