Skip to content

Commit 84cf88f

Browse files
Handle gss_import_cred() failure when importing gssx creds
Otherwise, we might attempt to set options on a non-existent handle, leading to a segfault. Signed-off-by: Robbie Harwood <[email protected]> Reviewed-by: Simo Sorce <[email protected]> Merges: #244
1 parent 5697dfd commit 84cf88f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/gp_export.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,10 @@ uint32_t gp_import_gssx_cred(uint32_t *min, struct gp_call_ctx *gpcall,
476476
}
477477

478478
ret_maj = gss_import_cred(&ret_min, &token, out);
479+
if (ret_maj) {
480+
GPDEBUG("gss_import_cred failed when importing gssx cred\n");
481+
goto done;
482+
}
479483

480484
/* check if there is any client option we need to set on credentials */
481485
gp_set_cred_options(cred, *out);

0 commit comments

Comments
 (0)