summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index 694cd630a..2b4168831 100644
--- a/monitor.c
+++ b/monitor.c
@@ -25,7 +25,7 @@
25 */ 25 */
26 26
27#include "includes.h" 27#include "includes.h"
28RCSID("$OpenBSD: monitor.c,v 1.32 2003/02/16 17:30:33 markus Exp $"); 28RCSID("$OpenBSD: monitor.c,v 1.33 2003/03/05 22:33:43 markus Exp $");
29 29
30#include <openssl/dh.h> 30#include <openssl/dh.h>
31 31
@@ -806,8 +806,9 @@ mm_answer_keyallowed(int socket, Buffer *m)
806 fatal("%s: unknown key type %d", __func__, type); 806 fatal("%s: unknown key type %d", __func__, type);
807 break; 807 break;
808 } 808 }
809 key_free(key);
810 } 809 }
810 if (key != NULL)
811 key_free(key);
811 812
812 /* clear temporarily storage (used by verify) */ 813 /* clear temporarily storage (used by verify) */
813 monitor_reset_key_state(); 814 monitor_reset_key_state();
@@ -1204,8 +1205,9 @@ mm_answer_rsa_keyallowed(int socket, Buffer *m)
1204 key_blob = blob; 1205 key_blob = blob;
1205 key_bloblen = blen; 1206 key_bloblen = blen;
1206 key_blobtype = MM_RSAUSERKEY; 1207 key_blobtype = MM_RSAUSERKEY;
1207 key_free(key);
1208 } 1208 }
1209 if (key != NULL)
1210 key_free(key);
1209 1211
1210 mm_append_debug(m); 1212 mm_append_debug(m);
1211 1213
@@ -1246,6 +1248,9 @@ mm_answer_rsa_challenge(int socket, Buffer *m)
1246 mm_request_send(socket, MONITOR_ANS_RSACHALLENGE, m); 1248 mm_request_send(socket, MONITOR_ANS_RSACHALLENGE, m);
1247 1249
1248 monitor_permit(mon_dispatch, MONITOR_REQ_RSARESPONSE, 1); 1250 monitor_permit(mon_dispatch, MONITOR_REQ_RSARESPONSE, 1);
1251
1252 xfree(blob);
1253 key_free(key);
1249 return (0); 1254 return (0);
1250} 1255}
1251 1256
@@ -1276,6 +1281,7 @@ mm_answer_rsa_response(int socket, Buffer *m)
1276 fatal("%s: received bad response to challenge", __func__); 1281 fatal("%s: received bad response to challenge", __func__);
1277 success = auth_rsa_verify_response(key, ssh1_challenge, response); 1282 success = auth_rsa_verify_response(key, ssh1_challenge, response);
1278 1283
1284 xfree(blob);
1279 key_free(key); 1285 key_free(key);
1280 xfree(response); 1286 xfree(response);
1281 1287