Incremental: Remove unnecesary NULL pointer checks when calling sysfs_free()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
parent
15d230f730
commit
fe112c9eba
|
@ -644,7 +644,6 @@ out:
|
|||
close(mdfd);
|
||||
if (policy)
|
||||
dev_policy_free(policy);
|
||||
if (sra)
|
||||
sysfs_free(sra);
|
||||
return rv;
|
||||
out_unlock:
|
||||
|
@ -989,7 +988,6 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
|
|||
sizeof(target->uuid)) == 0 &&
|
||||
sra->array.failed_disks > 0) {
|
||||
/* This is our target!! */
|
||||
if (chosen)
|
||||
sysfs_free(chosen);
|
||||
chosen = sra;
|
||||
sra = NULL;
|
||||
|
@ -1022,7 +1020,6 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
|
|||
sra = NULL;
|
||||
}
|
||||
next:
|
||||
if (sra)
|
||||
sysfs_free(sra);
|
||||
if (st != st2)
|
||||
free(st2);
|
||||
|
|
Loading…
Reference in New Issue