]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - oss_write.c
Make writers remove btr node on errors.
[paraslash.git] / oss_write.c
index 20b05009d38b08c10b06b64ebf44777a9d5a803d..c1717eb868cf6757e0aa447e9d6353273a47d89e 100644 (file)
@@ -249,6 +249,8 @@ static void oss_post_select_btr(__a_unused struct sched *s,
        ret = 0;
 out:
        t->error = ret;
        ret = 0;
 out:
        t->error = ret;
+       if (ret < 0)
+               btr_remove_node(btrn);
 }
 
 static int oss_open(struct writer_node *wn)
 }
 
 static int oss_open(struct writer_node *wn)
@@ -282,6 +284,11 @@ err_out:
        return NULL;
 }
 
        return NULL;
 }
 
+static void oss_free_config(void *conf)
+{
+       oss_cmdline_parser_free(conf);
+}
+
 /**
  * The init function of the oss writer.
  *
 /**
  * The init function of the oss writer.
  *
@@ -301,6 +308,7 @@ void oss_write_init(struct writer *w)
        w->post_select = oss_post_select;
        w->post_select_btr = oss_post_select_btr;
        w->parse_config = oss_parse_config;
        w->post_select = oss_post_select;
        w->post_select_btr = oss_post_select_btr;
        w->parse_config = oss_parse_config;
+       w->free_config = oss_free_config;
        w->shutdown = NULL;
        w->help = (struct ggo_help) {
                .short_help = oss_write_args_info_help,
        w->shutdown = NULL;
        w->help = (struct ggo_help) {
                .short_help = oss_write_args_info_help,