From d69997c8a323bb593f642830b28ed0c4d7de476c Mon Sep 17 00:00:00 2001 From: François Revol Date: Mon, 30 Dec 2013 15:40:12 +0100 Subject: beos: Add missing call to lwc_string_unref() --- beos/gui.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'beos') 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); + } } -- cgit v1.2.3