Fixed proper 'vfs' unref during non-interactive command mode.
authorshort <>
Sat, 13 Sep 2003 18:00:43 +0000 (18:00 +0000)
committershort <>
Sat, 13 Sep 2003 18:00:43 +0000 (18:00 +0000)
src/client/cmdline/main.c

index 4fc9085..299c28f 100644 (file)
@@ -200,6 +200,7 @@ gboolean errvfsresult_to_gerr(GError **errp,GnomeVFSResult errvfsresult)
 
 static GIOChannel *main_giochannel;
 
+void main_exit(void) G_GNUC_NORETURN;
 void main_exit(void)
 {
        if (cmdline_captive_vfs_object) {
@@ -302,5 +303,6 @@ struct captive_options options;
        /* 'cmd_argv' gets cleared by 'poptFreeContext(context);' below */
        poptFreeContext(context);
 
-       return EXIT_SUCCESS;
+       main_exit();    /* unref 'cmdline_captive_vfs_object' */
+       /* NOTREACHED */
 }