From: Peter Meerwald Date: Mon, 16 Dec 2013 14:54:29 +0000 (+0100) Subject: modules: Fix resource leak in stream-restore X-Git-Tag: v4.99.1~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bbed792cdf6fe823837aaa0f5dcefcf4f5ac1917;p=platform%2Fupstream%2Fpulseaudio.git modules: Fix resource leak in stream-restore https://scan7.coverity.com:8443/reports.htm#v10205/p10016/fileInstanceId=8726&defectInstanceId=3724&mergedDefectId=591260 Signed-off-by: Peter Meerwald --- diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c index 7eb79ab..9689e79 100644 --- a/src/modules/module-stream-restore.c +++ b/src/modules/module-stream-restore.c @@ -2119,8 +2119,10 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio pa_tagstruct_get_channel_map(t, &entry->channel_map) || pa_tagstruct_get_cvolume(t, &entry->volume) < 0 || pa_tagstruct_gets(t, &device) < 0 || - pa_tagstruct_get_boolean(t, &muted) < 0) + pa_tagstruct_get_boolean(t, &muted) < 0) { + entry_free(entry); goto fail; + } if (!name || !*name) { entry_free(entry);