summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sshsig.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sshsig.c b/sshsig.c
index 781153fce..15f9cead6 100644
--- a/sshsig.c
+++ b/sshsig.c
@@ -881,8 +881,10 @@ cert_filter_principals(const char *path, u_long linenum,
oprincipals = principals = *principalsp;
*principalsp = NULL;
- if ((nprincipals = sshbuf_new()) == NULL)
- return SSH_ERR_ALLOC_FAIL;
+ if ((nprincipals = sshbuf_new()) == NULL) {
+ r = SSH_ERR_ALLOC_FAIL;
+ goto out;
+ }
while ((cp = strsep(&principals, ",")) != NULL && *cp != '\0') {
if (strcspn(cp, "!?*") != strlen(cp)) {