summaryrefslogtreecommitdiff
path: root/testing/nTox.c
diff options
context:
space:
mode:
authorcharmlesscoin <charmlesscoin@gmail.com>2013-08-04 05:09:12 -0400
committercharmlesscoin <charmlesscoin@gmail.com>2013-08-04 05:09:12 -0400
commitae8367dc3ee5652a9b10e178ac269cd5cba8797a (patch)
treeffd5332d8c35026a9d63101f11da0fd39b6e6996 /testing/nTox.c
parent0b6806d7f74aca0273e41187d73685bd84eedd28 (diff)
whoops, returning a free'd variable is really not what I meant...
Diffstat (limited to 'testing/nTox.c')
-rw-r--r--testing/nTox.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/testing/nTox.c b/testing/nTox.c
index 15e209a9..9a07ecdc 100644
--- a/testing/nTox.c
+++ b/testing/nTox.c
@@ -142,7 +142,9 @@ void line_eval(char *line)
142 for (i = 0; i < 128; i++) 142 for (i = 0; i < 128; i++)
143 temp_id[i] = line[i+prompt_offset]; 143 temp_id[i] = line[i+prompt_offset];
144 144
145 int num = m_addfriend(hex_string_to_bin(temp_id), (uint8_t*)"Install Gentoo", sizeof("Install Gentoo")); 145 unsigned char *bin_string = hex_string_to_bin(temp_id);
146 int num = m_addfriend(bin_string, (uint8_t*)"Install Gentoo", sizeof("Install Gentoo"));
147 free(bin_string);
146 char numstring[100]; 148 char numstring[100];
147 switch (num) { 149 switch (num) {
148 case -1: 150 case -1:
@@ -456,7 +458,9 @@ int main(int argc, char *argv[])
456 else 458 else
457 exit(1); 459 exit(1);
458 460
459 DHT_bootstrap(bootstrap_ip_port, hex_string_to_bin(argv[3])); 461 unsigned char *binary_string = hex_string_to_bin(argv[3]);
462 DHT_bootstrap(bootstrap_ip_port, binary_string);
463 free(binary_string);
460 nodelay(stdscr, TRUE); 464 nodelay(stdscr, TRUE);
461 while(true) { 465 while(true) {
462 if (on == 0 && DHT_isconnected()) { 466 if (on == 0 && DHT_isconnected()) {