MINOR: arg: Use chunk_destroy() to release string arguments
This way, all fields of the buffer structure are reset when a string argument
(ARGT_STR) is released. It is also a good way to explicitly specify this kind
of argument is a chunk. So .data and .size fields must be set.
This patch may be backported to ease backports.
diff --git a/src/hlua.c b/src/hlua.c
index d2590d5..6ec69e4 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -1628,7 +1628,7 @@
lua_pushfstring(L, "'new': %s.", err);
lua_concat(L, 2);
free(err);
- free(args[0].data.str.area);
+ chunk_destroy(&args[0].data.str);
WILL_LJMP(lua_error(L));
}