/* "version" */
versrc = zip_source_buffer(zipfile, "2", 1, FALSE);
- if (zip_file_add(zipfile, "version", versrc, 0) < 0) {
+ if (zip_add(zipfile, "version", versrc) < 0) {
sr_err("Error saving version into zipfile: %s",
zip_strerror(zipfile));
zip_source_free(versrc);
g_key_file_free(meta);
metasrc = zip_source_buffer(zipfile, metabuf, metalen, FALSE);
- if (zip_file_add(zipfile, "metadata", metasrc, 0) < 0) {
+ if (zip_add(zipfile, "metadata", metasrc) < 0) {
sr_err("Error saving metadata into zipfile: %s",
zip_strerror(zipfile));
zip_source_free(metasrc);
return SR_OK;
}
-static int cleanup(struct sr_output *o)
-{
- struct out_context *outc;
-
- outc = o->priv;
- g_free(outc->filename);
- g_free(outc);
- o->priv = NULL;
-
- return SR_OK;
-}
-
static struct sr_option options[] = {
ALL_ZERO
};
return options;
}
+static int cleanup(struct sr_output *o)
+{
+ struct out_context *outc;
+
+ outc = o->priv;
+ g_variant_unref(options[0].def);
+ g_free(outc->filename);
+ g_free(outc);
+ o->priv = NULL;
+
+ return SR_OK;
+}
+
SR_PRIV struct sr_output_module output_srzip = {
.id = "srzip",
.name = "srzip",