Skip to content

Commit

Permalink
Merge pull request #186 from pallas/fix-parameter-leak
Browse files Browse the repository at this point in the history
raop/get_parameter: fix memory leak
  • Loading branch information
pallas authored Nov 22, 2020
2 parents 83b0652 + 58f9b76 commit adfa7de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/raop_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ raop_handler_get_parameter(raop_conn_t *conn,

while (current && (datalen - (current - data) > 0)) {
const char *next;
int handled = 0;

/* This is a bit ugly, but seems to be how airport works too */
if ((datalen - (current - data) >= 8) && !strncmp(current, "volume\r\n", 8)) {
Expand All @@ -491,7 +490,7 @@ raop_handler_get_parameter(raop_conn_t *conn,
if (*response_data) {
*response_datalen = strlen(*response_data);
}
handled = 1;
return;
}

for (next = current ; (datalen - (next - data) > 0) ; ++next)
Expand Down

0 comments on commit adfa7de

Please sign in to comment.