Skip to content

Commit

Permalink
Remove null checks
Browse files Browse the repository at this point in the history
Signed-off-by: P Aswini Kumar <[email protected]>
  • Loading branch information
P Aswini Kumar committed Sep 25, 2024
1 parent cdd036b commit 6f73bec
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions contrib/babelfishpg_tsql/src/procedures.c
Original file line number Diff line number Diff line change
Expand Up @@ -1707,13 +1707,9 @@ create_xp_qv_in_master_dbo_internal(PG_FUNCTION_ARGS)

char *dbo_scm = get_dbo_schema_name("master");

if (dbo_scm == NULL)
elog(ERROR, "Failed to retrieve dbo schema name");

query = psprintf(tempq, dbo_scm);

if(dbo_scm)
pfree(dbo_scm);
pfree(dbo_scm);

PG_TRY();
{
Expand Down Expand Up @@ -1800,14 +1796,10 @@ create_xp_instance_regread_in_master_dbo_internal(PG_FUNCTION_ARGS)

char *dbo_scm = get_dbo_schema_name("master");

if (dbo_scm == NULL)
elog(ERROR, "Failed to retrieve dbo schema name");

query = psprintf(tempq, dbo_scm);
query2 = psprintf(tempq2, dbo_scm);

if(dbo_scm)
pfree(dbo_scm);
pfree(dbo_scm);

PG_TRY();
{
Expand Down Expand Up @@ -3383,8 +3375,7 @@ sp_babelfish_volatility(PG_FUNCTION_ARGS)
pfree(logical_schema_name);
}

if(guest_role_name)
pfree(guest_role_name);
pfree(guest_role_name);
}
else
{
Expand Down

0 comments on commit 6f73bec

Please sign in to comment.