diff options
author | markus@openbsd.org <markus@openbsd.org> | 2020-03-06 19:28:50 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-03-13 03:18:31 +0100 |
commit | 5732d58020309364bf31fa125354e399361006db (patch) | |
tree | e1be58bbf8c41c2a88d71a0fff698a6780ec8ec6 /sshsig.c | |
parent | upstream: initialize seconds for debug message; ok djm (diff) | |
download | openssh-5732d58020309364bf31fa125354e399361006db.tar.xz openssh-5732d58020309364bf31fa125354e399361006db.zip |
upstream: do not leak oprincipals; ok djm
OpenBSD-Commit-ID: 4691d9387eab36f8fda48f5d8009756ed13a7c4c
Diffstat (limited to 'sshsig.c')
-rw-r--r-- | sshsig.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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)) { |