From: Peter Meerwald Date: Mon, 19 Dec 2011 11:28:41 +0000 (+0100) Subject: core: fix potential memory leak X-Git-Tag: 1.0_branch~154 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49fd49f21f372fd1370d6b2251ca93d197c3f4d3;p=profile%2Fivi%2Fpulseaudio.git core: fix potential memory leak --- diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 0173135..1aa5a9a 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -1982,8 +1982,10 @@ static char *get_path(const char *fn, pa_bool_t prependmid, pa_bool_t rt) { if (fn) { char *r; - if (pa_is_path_absolute(fn)) + if (pa_is_path_absolute(fn)) { + pa_xfree(rtp); return pa_xstrdup(fn); + } if (!rtp) return NULL;