Change recOpts in Image, it can be part of the Image struct, not a ptr.

This commit is contained in:
Vreixo Formoso
2007-12-29 16:49:04 +01:00
parent 71cd3ccb89
commit 501275279d
4 changed files with 50 additions and 59 deletions

View File

@ -77,15 +77,6 @@ int iso_image_new(const char *name, IsoImage **image)
return res;
}
img->refcount = 1;
img->recOpts = calloc(1, sizeof(IsoImageRecOpts));
if (img->recOpts == NULL) {
libiso_msgs_destroy(&img->messenger, 0);
iso_node_builder_unref(img->builder);
iso_filesystem_unref(img->fs);
iso_node_unref((IsoNode*)img->root);
free(img);
return ISO_MEM_ERROR;
}
if (name != NULL) {
img->volset_id = strdup(name);
@ -116,7 +107,6 @@ void iso_image_unref(IsoImage *image)
libiso_msgs_destroy(&image->messenger, 0);
iso_node_builder_unref(image->builder);
iso_filesystem_unref(image->fs);
free(image->recOpts);
free(image->volset_id);
free(image->volume_id);
free(image->publisher_id);