From 86e70db2112540e5f069e940dd29180fecd56612 Mon Sep 17 00:00:00 2001 From: martii Date: Wed, 14 Aug 2013 20:48:09 +0200 Subject: [PATCH] libspark/audio_mixer: don't try to free() stack-allocated snd_mixer_selem_id --- libspark/audio_mixer.cpp | 4 +--- libspark/audio_mixer.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/libspark/audio_mixer.cpp b/libspark/audio_mixer.cpp index f5a845a..e2e26f1 100644 --- a/libspark/audio_mixer.cpp +++ b/libspark/audio_mixer.cpp @@ -20,7 +20,7 @@ #include mixerVolume::mixerVolume(const char *name, const char *card, long volume) { - sid = NULL; + snd_mixer_selem_id_t *sid = NULL; elem = NULL; handle = NULL; min = 0; @@ -58,8 +58,6 @@ mixerVolume::~mixerVolume() { if (handle) snd_mixer_close(handle); - if (sid) - snd_mixer_selem_id_free(sid); } bool mixerVolume::setVolume(long volume) { diff --git a/libspark/audio_mixer.h b/libspark/audio_mixer.h index e716836..2a6f6fc 100644 --- a/libspark/audio_mixer.h +++ b/libspark/audio_mixer.h @@ -27,7 +27,6 @@ class mixerVolume long min, max; snd_mixer_t *handle; snd_mixer_elem_t* elem; - snd_mixer_selem_id_t *sid; public: mixerVolume(const char *selem_name, const char *Card, long volume = -1); ~mixerVolume(void);