summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Messenger.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Messenger.c b/core/Messenger.c
index 051078f9..8a5d9ed4 100644
--- a/core/Messenger.c
+++ b/core/Messenger.c
@@ -38,8 +38,9 @@ static int write_cryptpacket_id(Messenger *m, int friendnumber, uint8_t packet_i
38int realloc_friendlist(Messenger *m, uint32_t num) 38int realloc_friendlist(Messenger *m, uint32_t num)
39{ 39{
40 if (num * sizeof(Friend) == 0) return -1; 40 if (num * sizeof(Friend) == 0) return -1;
41 41
42 Friend *newfriendlist = realloc(m->friendlist, num * sizeof(Friend)); 42 Friend *newfriendlist = realloc(m->friendlist, num * sizeof(Friend));
43
43 if (newfriendlist == NULL && num != 0) 44 if (newfriendlist == NULL && num != 0)
44 return -1; 45 return -1;
45 46