Skip to content

Commit

Permalink
avserver: do not use a static string as a default for a string option
Browse files Browse the repository at this point in the history
Fixes an invalid free.

Bug-id: 448
  • Loading branch information
elenril committed Aug 4, 2013
1 parent 7684a36 commit 612a504
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion avserver.c
Expand Up @@ -301,7 +301,7 @@ static int rtp_new_av_stream(HTTPContext *c,

static const char *my_program_name;

static const char *config_filename = "/etc/avserver.conf";
static const char *config_filename;

static int avserver_debug;
static int no_launch;
Expand Down Expand Up @@ -4633,6 +4633,8 @@ int main(int argc, char **argv)
{
struct sigaction sigact = { { 0 } };

config_filename = av_strdup("/etc/avserver.conf");

parse_loglevel(argc, argv, options);
av_register_all();
avformat_network_init();
Expand Down

0 comments on commit 612a504

Please sign in to comment.