diff --git a/src/lua/httpc.c b/src/lua/httpc.c
index 5f4e2e912f645fc11193469398fa5f230e5a73ec..5572b70e9be3a4d32fceb37b4aa058caea175e86 100644
--- a/src/lua/httpc.c
+++ b/src/lua/httpc.c
@@ -112,6 +112,8 @@ parse_headers(lua_State *L, char *buffer, size_t len,
 		}
 	}
 
+	free(parser.hdr_name);
+
 	/* headers */
 	lua_settable(L, -3);