mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
remove superfluous free() checks
free() correctly handles NULL pointers, so we can omit explicit checks for that condition.
This commit is contained in:
parent
45850439b3
commit
4433248bf3
33 changed files with 108 additions and 205 deletions
|
|
@ -382,12 +382,9 @@ int snd_instr_iwffff_close(snd_iwffff_handle_t *handle)
|
|||
{
|
||||
if (handle == NULL)
|
||||
return -EINVAL;
|
||||
if (handle->dat_filename)
|
||||
free(handle->dat_filename);
|
||||
if (handle->fff_filename)
|
||||
free(handle->fff_filename);
|
||||
if (handle->fff_data)
|
||||
free(handle->fff_data);
|
||||
free(handle->dat_filename);
|
||||
free(handle->fff_filename);
|
||||
free(handle->fff_data);
|
||||
free(handle);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -396,8 +393,7 @@ static void free_wave(iwffff_wave_t *wave)
|
|||
{
|
||||
if (wave == NULL)
|
||||
return;
|
||||
if (wave->address.ptr != NULL)
|
||||
free(wave->address.ptr);
|
||||
free(wave->address.ptr);
|
||||
free(wave);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue