From: Steven Luo Date: Sun, 30 May 2010 07:48:37 +0000 (-0700) Subject: Fix memory leak on reconfiguration X-Git-Tag: v3.3b1~5 X-Git-Url: http://git.maemo.org/git/?p=browser-switch;a=commitdiff_plain;h=a3c6017d1b4ecc2107745eb1b02d6e8caf382b11;ds=sidebyside Fix memory leak on reconfiguration Caught by valgrind. --- diff --git a/main.c b/main.c index 30361c8..40823e3 100644 --- a/main.c +++ b/main.c @@ -50,6 +50,7 @@ static void read_config(int signalnum) { log_config(cfg.logging); ctx.continuous_mode = cfg.continuous_mode; + free(ctx.other_browser_cmd); if (cfg.other_browser_cmd) { if (!(ctx.other_browser_cmd = strdup(cfg.other_browser_cmd))) { log_perror(errno, "Failed to set other_browser_cmd");