diff options
author | 2020-03-06 18:28:50 +0000 | |
---|---|---|
committer | 2020-03-06 18:28:50 +0000 | |
commit | 6ab8b3a622070e06af9f403b9facd937337caea9 (patch) | |
tree | eb1eeb82a18ee75253335ea6ada2948d8e169891 /usr.bin/ssh | |
parent | initialize seconds for debug message; ok djm (diff) | |
download | wireguard-openbsd-6ab8b3a622070e06af9f403b9facd937337caea9.tar.xz wireguard-openbsd-6ab8b3a622070e06af9f403b9facd937337caea9.zip |
do not leak oprincipals; ok djm
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/sshsig.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshsig.c b/usr.bin/ssh/sshsig.c index d4ef9f573bf..8e6b19f3e2a 100644 --- a/usr.bin/ssh/sshsig.c +++ b/usr.bin/ssh/sshsig.c @@ -879,8 +879,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)) { |