From: Juho Vähä-Herttua Date: Wed, 21 Mar 2012 12:23:57 +0000 (+0200) Subject: Fix a memory leak in raop X-Git-Tag: upstream/0.9.0~4^2~87 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d1bbd169e04d1568d45d9ef50394cae4b2059161;p=deb_shairplay.git Fix a memory leak in raop --- diff --git a/src/lib/raop.c b/src/lib/raop.c index cd99b53..8ddb088 100644 --- a/src/lib/raop.c +++ b/src/lib/raop.c @@ -289,10 +289,11 @@ conn_request(void *ptr, http_request_t *request, http_response_t **response) memcpy(datastr, data, datalen); if (!strncmp(datastr, "volume: ", 8)) { float vol = 0.0; - sscanf(data+8, "%f", &vol); + sscanf(datastr+8, "%f", &vol); raop_rtp_set_volume(conn->raop_rtp, vol); } } + free(datastr); } else if (!strcmp(method, "FLUSH")) { const char *rtpinfo; int next_seq = -1;