Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix #61, this time for real.

  • Loading branch information...
commit ff7792163b54fc74d32d6bfe381284a5e5486066 1 parent 51abd03
Jonas Kramer authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 source/recommend.c
View
7 source/recommend.c
@@ -52,12 +52,12 @@ void recommend(struct hash track) {
users = neighbors(value(& rc, "username"));
users = merge(users, friends(value(& rc, "username")), 0);
- recipient = readline(& recipient_prompt);
+ recipient = strdup(readline(& recipient_prompt));
purge(users);
users = NULL;
- message = readline(& comment_prompt);
+ message = strdup(readline(& comment_prompt));
switch(key) {
case 'a':
@@ -83,6 +83,9 @@ void recommend(struct hash track) {
set(& h, "message", message);
set(& h, "recipient", recipient);
+ free(recipient);
+ free(message);
+
response = rest(method, & h);
error = error_message(response);
Please sign in to comment.
Something went wrong with that request. Please try again.