mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
Skip NULL check before dm_free
dm_free checks for NULL itself.
This commit is contained in:
parent
65fc4dae3a
commit
a5c6acf22a
@ -69,7 +69,6 @@ void archive_exit(struct cmd_context *cmd)
|
||||
{
|
||||
if (!cmd->archive_params)
|
||||
return;
|
||||
if (cmd->archive_params->dir)
|
||||
dm_free(cmd->archive_params->dir);
|
||||
memset(cmd->archive_params, 0, sizeof(*cmd->archive_params));
|
||||
}
|
||||
@ -183,7 +182,6 @@ void backup_exit(struct cmd_context *cmd)
|
||||
{
|
||||
if (!cmd->backup_params)
|
||||
return;
|
||||
if (cmd->backup_params->dir)
|
||||
dm_free(cmd->backup_params->dir);
|
||||
memset(cmd->backup_params, 0, sizeof(*cmd->backup_params));
|
||||
}
|
||||
|
@ -279,7 +279,6 @@ static int _cluster_request(char clvmd_cmd, const char *node, void *data, int le
|
||||
*response = rarray;
|
||||
|
||||
out:
|
||||
if (retbuf)
|
||||
dm_free(retbuf);
|
||||
|
||||
return status;
|
||||
|
@ -125,6 +125,5 @@ int cmp_timestamp(struct timestamp *t1, struct timestamp *t2)
|
||||
|
||||
void destroy_timestamp(struct timestamp *t)
|
||||
{
|
||||
if (t)
|
||||
dm_free(t);
|
||||
}
|
||||
|
@ -486,20 +486,11 @@ void dm_task_destroy(struct dm_task *dmt)
|
||||
dm_free(t);
|
||||
}
|
||||
|
||||
if (dmt->dev_name)
|
||||
dm_free(dmt->dev_name);
|
||||
|
||||
if (dmt->newname)
|
||||
dm_free(dmt->newname);
|
||||
|
||||
if (dmt->message)
|
||||
dm_free(dmt->message);
|
||||
|
||||
_dm_zfree_dmi(dmt->dmi.v4);
|
||||
|
||||
if (dmt->uuid)
|
||||
dm_free(dmt->dev_name);
|
||||
dm_free(dmt->newname);
|
||||
dm_free(dmt->message);
|
||||
dm_free(dmt->uuid);
|
||||
|
||||
dm_free(dmt);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user