repositories
/
deb_shairplay.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a memory leak in raop
[deb_shairplay.git]
/
src
/
lib
/
raop.c
diff --git
a/src/lib/raop.c
b/src/lib/raop.c
index cd99b53b77c19b3f65ecd56dd0814889ae9da87b..8ddb0887e8b541d486f739f28970ececc4836192 100644
(file)
--- 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;
memcpy(datastr, data, datalen);
if (!strncmp(datastr, "volume: ", 8)) {
float vol = 0.0;
- sscanf(data+8, "%f", &vol);
+ sscanf(data
str
+8, "%f", &vol);
raop_rtp_set_volume(conn->raop_rtp, vol);
}
}
raop_rtp_set_volume(conn->raop_rtp, vol);
}
}
+ free(datastr);
} else if (!strcmp(method, "FLUSH")) {
const char *rtpinfo;
int next_seq = -1;
} else if (!strcmp(method, "FLUSH")) {
const char *rtpinfo;
int next_seq = -1;