]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Might as well free current_file
authorDirk Hohndel <dirk@hohndel.org>
Sun, 26 Aug 2012 22:35:48 +0000 (15:35 -0700)
committerDirk Hohndel <dirk@hohndel.org>
Sun, 26 Aug 2012 22:36:40 +0000 (15:36 -0700)
In commit fd2debc1e730 ("replaced stdndup() with the inlined equivalent")
Lubomir freed the memory from one of my two strdups but not the other.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
gtk-gui.c

index bebc4f932d3838c872d8aa2045938166f8d0234f..895ef449365ec220bd833c28f1bcf0745b508a21 100644 (file)
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -222,6 +222,7 @@ static void file_save_as(GtkWidget *w, gpointer data)
        gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), current_file);
 
        free(current_dir);
+       free(current_file);
 
        if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
                filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));