summaryrefslogtreecommitdiff
path: root/core/DHT.c
diff options
context:
space:
mode:
authorMichael Rose <michael_rose@gmx.de>2013-08-19 14:40:15 +0200
committerMichael Rose <michael_rose@gmx.de>2013-08-19 14:40:15 +0200
commit0aabb5bc49eb86c4168bbf4f369f72fa97d50c53 (patch)
tree7f68fd93e728f7de5f350ad1bc9e4f6a467cd08a /core/DHT.c
parentd6ae8dce983925a3f1462d111b5243fff3be31ec (diff)
parent4b480381ee7e1b5bbf3c253c0c4bf045e43f0a0e (diff)
Merge with upstream
Diffstat (limited to 'core/DHT.c')
-rw-r--r--core/DHT.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/DHT.c b/core/DHT.c
index 55f34994..924e3216 100644
--- a/core/DHT.c
+++ b/core/DHT.c
@@ -704,6 +704,12 @@ int DHT_delfriend(uint8_t *client_id)
704 CLIENT_ID_SIZE ); 704 CLIENT_ID_SIZE );
705 } 705 }
706 706
707 if (num_friends == 0) {
708 free(friends_list);
709 friends_list = NULL;
710 return 0;
711 }
712
707 temp = realloc(friends_list, sizeof(Friend) * (num_friends)); 713 temp = realloc(friends_list, sizeof(Friend) * (num_friends));
708 714
709 if (temp == NULL) 715 if (temp == NULL)