aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-19 00:06:21 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-19 00:06:21 +0200
commit9299e840da5ba5ff37aae658da5f41ce22319cfa (patch)
tree81e7ba088dbaa4bfd1497b6bdc3a8cad2ad17375 /src
parentreduce code complexity (diff)
downloadmds-9299e840da5ba5ff37aae658da5f41ce22319cfa.tar.gz
mds-9299e840da5ba5ff37aae658da5f41ce22319cfa.tar.bz2
mds-9299e840da5ba5ff37aae658da5f41ce22319cfa.tar.xz
fix regression
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mds-server/mds-server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mds-server/mds-server.c b/src/mds-server/mds-server.c
index 7da5f39..a9d4422 100644
--- a/src/mds-server/mds-server.c
+++ b/src/mds-server/mds-server.c
@@ -443,7 +443,7 @@ int message_received(client_t* client)
if (assign_id && (client->id == 0))
{
intercept |= 2;
- with_mutex_if (slave_mutex, (client->id = ++next_client_id) == 0,
+ with_mutex_if (slave_mutex, (client->id = next_client_id++) == 0,
eprint("this is impossible, ID counter has overflowed.");
/* If the program ran for a millennium it would
take c:a 585 assignments per nanosecond. This
@@ -717,6 +717,7 @@ void queue_message_multicast(char* message, size_t length, client_t* sender)
goto fail_queue;
sender->multicasts = new_buf;
sender->multicasts[sender->multicasts_count++] = *multicast;
+ free(multicast);
multicast = NULL;
fail_queue:
);