# HG changeset patch # User reimar # Date 1351620210 0 # Node ID 8b8e20725b249843b4724451ef691a37ea4112c9 # Parent 4a62631ecaddf672b4392e3aefbacdf230e346a7 Free memory allocated by get_path. diff -r 4a62631ecadd -r 8b8e20725b24 command.c --- a/command.c Tue Oct 30 18:00:52 2012 +0000 +++ b/command.c Tue Oct 30 18:03:30 2012 +0000 @@ -194,7 +194,7 @@ fname = get_path("subtitle_log"); f = fopen(fname, "a"); if (!f) - return; + goto out; fprintf(f, "----------------------------------------------------------\n"); if (subdata->sub_uses_time) { fprintf(f, @@ -212,6 +212,8 @@ fprintf(f, "%s\n", vo_sub_last->text[i]); } fclose(f); +out: + free(fname); }