summaryrefslogtreecommitdiff
path: root/beos
diff options
context:
space:
mode:
Diffstat (limited to 'beos')
-rw-r--r--beos/gui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/beos/gui.cpp b/beos/gui.cpp
index 537c3a5a2..131173c64 100644
--- a/beos/gui.cpp
+++ b/beos/gui.cpp
@@ -918,10 +918,11 @@ void nsbeos_gui_view_source(struct hlcache_handle *content)
return;
}
lwc_string *mime = content_get_mime_type(content);
- const char *mime_string = lwc_string_data(mime);
- if (mime)
+ if (mime) {
file.WriteAttr("BEOS:TYPE", B_MIME_STRING_TYPE, 0LL,
- mime_string, lwc_string_length(mime) + 1);
+ lwc_string_data(mime), lwc_string_length(mime) + 1);
+ lwc_string_unref(mime);
+ }
}