audio: Drop superfluous conditionals around g_free()
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTmt0QAAoJEEy22O7T6HE4iI0QAJ0uJitRGMLnmdhz9qn2txz4 hK39NdNnKH9Mcna1CD6xfunVA87pKUZt1GoweDQ4y/spKC/W/wlcfxqhL+E3LNTJ OODQ1pCBGvR3rMpZWfXmcBzAWErvqHzfGI3nsAcixfT4I4fxs//EzJR8tw9IVXvG rA7mnW2S492iqbeGvrhBbbono5KIGz4OhB0gM+Eb3lrzJYsD4LOC0BreitORkNaW BqWTj0y0YcDQh62rX8UtooSy6Bht8x8wiexzrjZI0Ch0FA8XRfqwz9p7GNdMlQLC D/up3cO8fIhE/ksvWgtywV0pxhO8srXTl5RW2Ygi3tlZCAHCdgnte+TwnYi4ntJU 7l4piCQ57KCa5hZNg7lyHPmU/WL4QuuGFQcP/narHlYJu2AYdnLbz/M5RiqP2R4Q fsALZNR9dlgl0tfGof9WdkMNCI+o14x2Y5P/7H+eLx1wZD1QerTwbGVofayUY54N 1SJIli17bnzi0g98mlTJp+4ydW/IT9QcRdlm14trizCdaibvU9u6ZkRLSKA7HPDL a8J2jq/RNUwppQqrOMh2opRmtfIb2mH9lX29XsaZ6PYxdcimwRHQ4idH4WjY577m 9D8v44ANlBsWzNdmrwGK+Kb1Ny4wuTXpYLgmNJ+7O/N4PhT0A5zKVpbRKdkZE1+c uQ7SsAHxV3Q8l+oPFBkh =HaqS -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20140613-1' into staging audio: Drop superfluous conditionals around g_free() # gpg: Signature made Fri 13 Jun 2014 12:14:24 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-audio-20140613-1: audio: Drop superfluous conditionals around g_free() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
d61de7255b
@ -815,10 +815,8 @@ static void alsa_fini_out (HWVoiceOut *hw)
|
||||
ldebug ("alsa_fini\n");
|
||||
alsa_anal_close (&alsa->handle, &alsa->pollhlp);
|
||||
|
||||
if (alsa->pcm_buf) {
|
||||
g_free (alsa->pcm_buf);
|
||||
alsa->pcm_buf = NULL;
|
||||
}
|
||||
g_free(alsa->pcm_buf);
|
||||
alsa->pcm_buf = NULL;
|
||||
}
|
||||
|
||||
static int alsa_init_out (HWVoiceOut *hw, struct audsettings *as)
|
||||
@ -978,10 +976,8 @@ static void alsa_fini_in (HWVoiceIn *hw)
|
||||
|
||||
alsa_anal_close (&alsa->handle, &alsa->pollhlp);
|
||||
|
||||
if (alsa->pcm_buf) {
|
||||
g_free (alsa->pcm_buf);
|
||||
alsa->pcm_buf = NULL;
|
||||
}
|
||||
g_free(alsa->pcm_buf);
|
||||
alsa->pcm_buf = NULL;
|
||||
}
|
||||
|
||||
static int alsa_run_in (HWVoiceIn *hw)
|
||||
|
@ -71,10 +71,7 @@ static void glue (audio_init_nb_voices_, TYPE) (struct audio_driver *drv)
|
||||
|
||||
static void glue (audio_pcm_hw_free_resources_, TYPE) (HW *hw)
|
||||
{
|
||||
if (HWBUF) {
|
||||
g_free (HWBUF);
|
||||
}
|
||||
|
||||
g_free (HWBUF);
|
||||
HWBUF = NULL;
|
||||
}
|
||||
|
||||
@ -92,9 +89,7 @@ static int glue (audio_pcm_hw_alloc_resources_, TYPE) (HW *hw)
|
||||
|
||||
static void glue (audio_pcm_sw_free_resources_, TYPE) (SW *sw)
|
||||
{
|
||||
if (sw->buf) {
|
||||
g_free (sw->buf);
|
||||
}
|
||||
g_free (sw->buf);
|
||||
|
||||
if (sw->rate) {
|
||||
st_rate_stop (sw->rate);
|
||||
@ -172,10 +167,8 @@ static int glue (audio_pcm_sw_init_, TYPE) (
|
||||
static void glue (audio_pcm_sw_fini_, TYPE) (SW *sw)
|
||||
{
|
||||
glue (audio_pcm_sw_free_resources_, TYPE) (sw);
|
||||
if (sw->name) {
|
||||
g_free (sw->name);
|
||||
sw->name = NULL;
|
||||
}
|
||||
g_free (sw->name);
|
||||
sw->name = NULL;
|
||||
}
|
||||
|
||||
static void glue (audio_pcm_hw_add_sw_, TYPE) (HW *hw, SW *sw)
|
||||
|
@ -736,10 +736,8 @@ static void oss_fini_in (HWVoiceIn *hw)
|
||||
|
||||
oss_anal_close (&oss->fd);
|
||||
|
||||
if (oss->pcm_buf) {
|
||||
g_free (oss->pcm_buf);
|
||||
oss->pcm_buf = NULL;
|
||||
}
|
||||
g_free(oss->pcm_buf);
|
||||
oss->pcm_buf = NULL;
|
||||
}
|
||||
|
||||
static int oss_run_in (HWVoiceIn *hw)
|
||||
|
@ -275,9 +275,7 @@ static void Adlib_fini (AdlibState *s)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (s->mixbuf) {
|
||||
g_free (s->mixbuf);
|
||||
}
|
||||
g_free(s->mixbuf);
|
||||
|
||||
s->active = 0;
|
||||
s->enabled = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user