logevent("Sent public key signature");
s->type = AUTH_TYPE_PUBLICKEY;
key->alg->freekey(key->data);
+ sfree(key->comment);
+ sfree(key);
}
#ifndef NO_GSSAPI
int public_blob_len;
int i;
const char *error = NULL;
- char *comment;
+ char *comment = NULL;
public_blob = NULL;
goto error;
/* Select key algorithm structure. */
alg = find_pubkey_alg(b);
+ sfree(b);
if (!alg) {
- sfree(b);
goto error;
}
- sfree(b);
/* Read the Encryption header line. */
if (!read_header(fp, header) || 0 != strcmp(header, "Encryption"))
sfree(public_blob);
if (errorstr)
*errorstr = error;
+ if (comment && commentptr) {
+ sfree(comment);
+ *commentptr = NULL;
+ }
return NULL;
}