+
+Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+ * image.c, metadata-internals.h: don't keep a file descriptor open
+ for loaded assemblies (bug#325988).
+
2007-09-19 Raja R Harinath <rharinath@novell.com>
* metadata.c (signature_in_image): New. Carve out of type_in_image.
return NULL;
}
image = g_new0 (MonoImage, 1);
- image->file_descr = filed;
+ image->raw_buffer_used = TRUE;
image->raw_data_len = stat_buf.st_size;
image->raw_data = mono_raw_buffer_load (fileno (filed), FALSE, 0, stat_buf.st_size);
iinfo = g_new0 (MonoCLIImageInfo, 1);
image->ref_only = refonly;
image->ref_count = 1;
+ fclose (filed);
+
return do_mono_image_load (image, status, care_about_cli);
}
mono_images_unlock ();
- if (image->file_descr) {
- fclose (image->file_descr);
- image->file_descr = NULL;
+ if (image->raw_buffer_used) {
if (image->raw_data != NULL)
mono_raw_buffer_free (image->raw_data);
}
* this image between calls of mono_image_open () and mono_image_close ().
*/
int ref_count;
- FILE *file_descr;
- /* if file_descr is NULL the image was loaded from raw data */
char *raw_data;
guint32 raw_data_len;
+ guint8 raw_buffer_used : 1;
guint8 raw_data_allocated : 1;
/* Whenever this is a dynamically emitted module */