| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1429,7 +1429,7 @@ static void clipboard_selector_handler(union control *ctrl, dlgparam *dlg, | |||
| 1429 | 1429 | #endif | |
| 1430 | 1430 | ) { | |
| 1431 | 1431 | #ifdef NAMED_CLIPBOARDS | |
| 1432 | - const char *sval = dlg_editbox_get(ctrl, dlg); | ||
| 1432 | + char *sval = dlg_editbox_get(ctrl, dlg); | ||
| 1433 | 1433 | int i; | |
| 1434 | 1434 | ||
| 1435 | 1435 | for (i = 0; i < lenof(options); i++) | |
@@ -1444,6 +1444,8 @@ static void clipboard_selector_handler(union control *ctrl, dlgparam *dlg, | |||
| 1444 | 1444 | sval++; | |
| 1445 | 1445 | conf_set_str(conf, strsetting, sval); | |
| 1446 | 1446 | } | |
| 1447 | + | ||
| 1448 | + sfree(sval); | ||
| 1447 | 1449 | #else | |
| 1448 | 1450 | int index = dlg_listbox_index(ctrl, dlg); | |
| 1449 | 1451 | if (index >= 0) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -538,8 +538,10 @@ static ssh2_userkey *openssh_pem_read( | |||
| 538 | 538 | strbuf *blob = strbuf_new_nm(); | |
| 539 | 539 | int privptr = 0, publen; | |
| 540 | 540 | ||
| 541 | - if (!key) | ||
| 541 | + if (!key) { | ||
| 542 | + strbuf_free(blob); | ||
| 542 | 543 | return NULL; | |
| 544 | + } | ||
| 543 | 545 | ||
| 544 | 546 | if (key->encrypted) { | |
| 545 | 547 | unsigned char keybuf[32]; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1290,6 +1290,9 @@ int pageant_add_keyfile(Filename *filename, const char *passphrase, | |||
| 1290 | 1290 | if (resplen < 5 || response[4] != SSH_AGENT_SUCCESS) { | |
| 1291 | 1291 | *retstr = dupstr("The already running Pageant " | |
| 1292 | 1292 | "refused to add the key."); | |
| 1293 | + sfree(skey->comment); | ||
| 1294 | + ssh_key_free(skey->key); | ||
| 1295 | + sfree(skey); | ||
| 1293 | 1296 | sfree(response); | |
| 1294 | 1297 | return PAGEANT_ACTION_FAILURE; | |
| 1295 | 1298 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -640,10 +640,10 @@ static void sesschan_notify_remote_exit(Seat *seat) | |||
| 640 | 640 | sshfwd_send_exit_signal( | |
| 641 | 641 | sess->c, signame, false, ptrlen_from_asciz(sigmsg)); | |
| 642 | 642 | ||
| 643 | - sfree(sigmsg); | ||
| 644 | - | ||
| 645 | 643 | got_signal = true; | |
| 646 | 644 | } | |
| 645 | + | ||
| 646 | + sfree(sigmsg); | ||
| 647 | 647 | } else { | |
| 648 | 648 | int signum = pty_backend_exit_signum(sess->backend); | |
| 649 | 649 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -72,8 +72,10 @@ static char *dss_cache_str(ssh_key *key) | |||
| 72 | 72 | struct dss_key *dss = container_of(key, struct dss_key, sshk); | |
| 73 | 73 | strbuf *sb = strbuf_new(); | |
| 74 | 74 | ||
| 75 | - if (!dss->p) | ||
| 75 | + if (!dss->p) { | ||
| 76 | + strbuf_free(sb); | ||
| 76 | 77 | return NULL; | |
| 78 | + } | ||
| 77 | 79 | ||
| 78 | 80 | append_hex_to_strbuf(sb, dss->p); | |
| 79 | 81 | append_hex_to_strbuf(sb, dss->q); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,6 +29,7 @@ Socket *platform_make_agent_socket( | |||
| 29 | 29 | if ((errw = make_dir_and_check_ours(socketdir)) != NULL) { | |
| 30 | 30 | *error = dupprintf("%s: %s\n", socketdir, errw); | |
| 31 | 31 | sfree(errw); | |
| 32 | + sfree(socketdir); | ||
| 32 | 33 | return NULL; | |
| 33 | 34 | } | |
| 34 | 35 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -490,6 +490,7 @@ static int ssh_sftp_do_select(bool include_stdin, bool no_fds_ok) | |||
| 490 | 490 | ||
| 491 | 491 | if (i < 1 && !no_fds_ok && !toplevel_callback_pending()) { | |
| 492 | 492 | pollwrap_free(pw); | |
| 493 | + sfree(fdlist); | ||
| 493 | 494 | return -1; /* doom */ | |
| 494 | 495 | } | |
| 495 | 496 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments