Skip to content

Commit aa06803

Browse files
committed
free memory printing player command
1 parent fba5eb4 commit aa06803

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ctl/sinkctl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,14 +538,15 @@ void launch_player(struct ctl_sink *s) {
538538
size += strlen(argv[i++]) + 1;
539539
}
540540

541-
char* player_command = malloc(size);
541+
gchar* player_command = malloc(size);
542542
i = 0;
543543
strcpy(player_command, argv[i++]);
544544
while (argv[i]) {
545545
strcat(player_command, " ");
546546
strcat(player_command, argv[i++]);
547547
}
548548
log_debug("player command: %s", player_command);
549+
g_free(player_command);
549550
if (execvpe(argv[0], argv, environ) < 0) {
550551
cli_debug("stream player failed (%d): %m", errno);
551552
int i = 0;

0 commit comments

Comments
 (0)