# HG changeset patch # User Thinker K.F. Li # Date 1283073417 -28800 # Node ID 9d430b084a13ecb0ce86d891f57a551cfd6cd0bb # Parent be0e02948c1d54a07554a66427231961547c483b Free string allocated by code generator diff -r be0e02948c1d -r 9d430b084a13 nodejs/shapes.cc --- a/nodejs/shapes.cc Sun Aug 29 13:34:40 2010 +0800 +++ b/nodejs/shapes.cc Sun Aug 29 17:16:57 2010 +0800 @@ -256,6 +256,8 @@ rdman = X_njs_MB_rdman(rt); sh = rdman_shape_path_new(rdman, d); + /* Code generator supposes that callee should free the memory */ + free((void *)d); return sh; } @@ -267,6 +269,8 @@ rdman = X_njs_MB_rdman(rt); sh = rdman_shape_stext_new(rdman, txt, x, y); + /* Code generator supposes that callee should free the memory */ + free((void *)txt); return sh; }