Commit ce3c7cd9 authored by Olivier Bertrand's avatar Olivier Bertrand

Handle error return from SetPath

parent 2d85b100
......@@ -120,7 +120,9 @@ PQRYRES JSONColumns(PGLOBAL g, char *db, char *dsn, PTOS topt, bool info)
return NULL;
} // endif Fn
tdp->Database = SetPath(g, db);
if (!(tdp->Database = SetPath(g, db)))
return NULL;
tdp->Objname = GetStringTableOption(g, topt, "Object", NULL);
tdp->Base = GetIntegerTableOption(g, topt, "Base", 0) ? 1 : 0;
tdp->Pretty = GetIntegerTableOption(g, topt, "Pretty", 2);
......
......@@ -157,7 +157,10 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
tdp = new(g) XMLDEF;
tdp->Fn = fn;
tdp->Database = SetPath(g, db);
if (!(tdp->Database = SetPath(g, db)))
return NULL;
tdp->Tabname = tab;
tdp->Zipped = GetBooleanTableOption(g, topt, "Zipped", false);
tdp->Entry = GetStringTableOption(g, topt, "Entry", NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment