diff --git a/cmdgen.c b/cmdgen.c index 6308f151..3f112755 100644 --- a/cmdgen.c +++ b/cmdgen.c @@ -1072,6 +1072,9 @@ int main(int argc, char **argv) ssh_key_free(ssh2key->key); sfree(ssh2key); } + sfree(origcomment); + if (infilename) + filename_free(infilename); filename_free(outfilename); return 0; diff --git a/settings.c b/settings.c index 79d2c861..59c7e8a5 100644 --- a/settings.c +++ b/settings.c @@ -519,6 +519,7 @@ static void read_clip_setting(settings_r *sesskey, char *savekey, val = CLIPUI_NONE; } conf_set_int(conf, confkey, val); + sfree(setting); } char *save_settings(const char *section, Conf *conf) diff --git a/ssh2transhk.c b/ssh2transhk.c index e6803c56..237fdee1 100644 --- a/ssh2transhk.c +++ b/ssh2transhk.c @@ -66,6 +66,7 @@ void ssh_transient_hostkey_cache_free(ssh_transient_hostkey_cache *thc) sfree(ent); } freetree234(thc->cache); + sfree(thc); } void ssh_transient_hostkey_cache_add( diff --git a/sshprime.c b/sshprime.c index 33000273..4d1524aa 100644 --- a/sshprime.c +++ b/sshprime.c @@ -451,6 +451,7 @@ void invent_firstbits(unsigned *one, unsigned *two, unsigned min_separation) } mp_free(randval); + mp_free(total); /* * Check everything came out right. diff --git a/sshrsa.c b/sshrsa.c index 062dd1ee..310a92e5 100644 --- a/sshrsa.c +++ b/sshrsa.c @@ -332,6 +332,7 @@ bool rsa_verify(RSAKey *key) mp_int *q_new = mp_min(key->p, key->q); mp_free(key->p); mp_free(key->q); + mp_free(key->iqmp); key->p = p_new; key->q = q_new; key->iqmp = mp_invert(key->q, key->p);