From 9f07bfb31ea556c41b45cdc3f37b6ccccbc8dca0 Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 25 Mar 2006 21:15:46 +0100 Subject: [PATCH 1/1] mysql selector: Fix a memory leak in get_query() If the stream definition contained N > 1 "score:" lines (an invalid configuration anyway, there should be at most one), we leaked the first N - 1 score lines. The fix is to take into account the first one only. --- mysql_selector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql_selector.c b/mysql_selector.c index b51f4f07..c5f71cdd 100644 --- a/mysql_selector.c +++ b/mysql_selector.c @@ -1187,7 +1187,7 @@ static char *get_query(char *streamname, char *filename, int with_path) free(tmp2); continue; } - if (!strcmp(command, "score:")) + if (!score && !strcmp(command, "score:")) score = s_a_r_list(macro_list, arg); } if (!score) { -- 2.39.2