Skip to content

Commit

Permalink
login-common: client_unref() - always set client pointer to NULL
Browse files Browse the repository at this point in the history
This is the common coding practise elsewhere as well.
  • Loading branch information
sirainen authored and Timo Sirainen committed Nov 2, 2017
1 parent 5885eec commit b833824
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/login-common/client-common.c
Expand Up @@ -326,12 +326,12 @@ bool client_unref(struct client **_client)
{
struct client *client = *_client;

*_client = NULL;

i_assert(client->refcount > 0);
if (--client->refcount > 0)
return TRUE;

*_client = NULL;

i_assert(client->destroyed);
i_assert(client->login_proxy == NULL);

Expand Down

0 comments on commit b833824

Please sign in to comment.