[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.16-test2-1-g61fefd6
Colin Guthrie
gitmailer-noreply at 0pointer.de
Sun Jul 12 13:10:00 PDT 2009
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from 6fdd5846b24dd9346bfa5abae1fd727189681477 (commit)
- Log -----------------------------------------------------------------
61fefd6 introspect: Fix two memory issues in port handling code.
-----------------------------------------------------------------------
Summary of changes:
src/pulse/introspect.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
commit 61fefd67dab01011d97a06b7e3dd51101d5f5749
Author: Colin Guthrie <cguthrie at mandriva.org>
Date: Sun Jul 12 20:43:21 2009 +0100
introspect: Fix two memory issues in port handling code.
First one is a simple typo on an error condition that would have likely caused issues if it ever cropped up.
Second issue is that port information is never actually freed if everything works fine.
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index 3414f7d..27a587c 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
@@ -212,8 +212,8 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, u
pa_tagstruct_getu32(t, &i.ports[0][j].priority) < 0) {
pa_context_fail(o->context, PA_ERR_PROTOCOL);
- pa_xfree(i.ports);
pa_xfree(i.ports[0]);
+ pa_xfree(i.ports);
pa_proplist_free(i.proplist);
goto finish;
}
@@ -250,6 +250,10 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, u
cb(o->context, &i, 0, o->userdata);
}
+ if (i.ports) {
+ pa_xfree(i.ports[0]);
+ pa_xfree(i.ports);
+ }
pa_proplist_free(i.proplist);
}
}
@@ -479,6 +483,10 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command,
cb(o->context, &i, 0, o->userdata);
}
+ if (i.ports) {
+ pa_xfree(i.ports[0]);
+ pa_xfree(i.ports);
+ }
pa_proplist_free(i.proplist);
}
}
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list