mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-23 20:16:21 +00:00
most FREE_SET_NULL replaced with free
FREE_SET_NULL makes extra assignment of NULL for pointers in stack or dynamic memory that is going to be freed. FREE_SET_NULL is useful for pointers that can be used in future.
This commit is contained in:
@@ -236,13 +236,13 @@ void
|
||||
accounts_free_account(ProfAccount *account)
|
||||
{
|
||||
if (account != NULL) {
|
||||
FREE_SET_NULL(account->name);
|
||||
FREE_SET_NULL(account->jid);
|
||||
FREE_SET_NULL(account->resource);
|
||||
FREE_SET_NULL(account->server);
|
||||
FREE_SET_NULL(account->last_presence);
|
||||
FREE_SET_NULL(account->login_presence);
|
||||
FREE_SET_NULL(account);
|
||||
free(account->name);
|
||||
free(account->jid);
|
||||
free(account->resource);
|
||||
free(account->server);
|
||||
free(account->last_presence);
|
||||
free(account->login_presence);
|
||||
free(account);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user