seed r52 - trunk/libseed
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: seed r52 - trunk/libseed
- Date: Sun, 2 Nov 2008 06:07:22 +0000 (UTC)
Author: racarr
Date: Sun Nov 2 06:07:22 2008
New Revision: 52
URL: http://svn.gnome.org/viewvc/seed?rev=52&view=rev
Log:
Small leak.
Modified:
trunk/libseed/seed-builtins.c
Modified: trunk/libseed/seed-builtins.c
==============================================================================
--- trunk/libseed/seed-builtins.c (original)
+++ trunk/libseed/seed-builtins.c Sun Nov 2 06:07:22 2008
@@ -31,6 +31,7 @@
const JSValueRef arguments[],
JSValueRef * exception)
{
+ JSStringRef file_contents, file_name;
const gchar * import_file;
gchar * buffer, * walk;
@@ -58,8 +59,13 @@
walk = strdup(walk);
g_free(buffer);
- JSEvaluateScript(ctx, JSStringCreateWithUTF8CString(walk),
- NULL, JSStringCreateWithUTF8CString(import_file), 0, NULL);
+ file_contents = JSStringCreateWithUTF8CString(walk);
+ file_name = JSStringCreateWithUTF8CString(import_file);
+ JSEvaluateScript(ctx, file_contents,
+ NULL, file_name, 0, NULL);
+
+ JSStringRelease(file_contents);
+ JSStringRelease(file_name);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]