Message ID | 1358356653-16309-1-git-send-email-sw@weilnetz.de |
---|---|
State | Accepted |
Headers | show |
Applied. Thanks. Regards, Anthony Liguori
diff --git a/audio/audio.c b/audio/audio.c index 1510b59..02bb886 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -828,8 +828,9 @@ static int audio_attach_capture (HWVoiceOut *hw) QLIST_INSERT_HEAD (&hw_cap->sw_head, sw, entries); QLIST_INSERT_HEAD (&hw->cap_head, sc, entries); #ifdef DEBUG_CAPTURE - asprintf (&sw->name, "for %p %d,%d,%d", - hw, sw->info.freq, sw->info.bits, sw->info.nchannels); + sw->name = g_strdup_printf ("for %p %d,%d,%d", + hw, sw->info.freq, sw->info.bits, + sw->info.nchannels); dolog ("Added %s active = %d\n", sw->name, sw->active); #endif if (sw->active) {
sw->name already uses the correct g_free to free the allocated memory. Signed-off-by: Stefan Weil <sw@weilnetz.de> --- audio/audio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) The patch preserves the special coding style used for audio code. Regards, Stefan