Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)

from before "if(x) free(x)".
This commit is contained in:
Rob Landley
2006-03-01 16:39:45 +00:00
parent 93f2286e6e
commit e7c43b66d7
33 changed files with 139 additions and 281 deletions

View File

@@ -203,10 +203,8 @@ static errcode_t test_open(const char *name, int flags, io_channel *channel)
return 0;
cleanup:
if (io)
ext2fs_free_mem(&io);
if (data)
ext2fs_free_mem(&data);
ext2fs_free_mem(&io);
ext2fs_free_mem(&data);
return retval;
}
@@ -229,8 +227,7 @@ static errcode_t test_close(io_channel channel)
fclose(data->outfile);
ext2fs_free_mem(&channel->private_data);
if (channel->name)
ext2fs_free_mem(&channel->name);
ext2fs_free_mem(&channel->name);
ext2fs_free_mem(&channel);
return retval;
}