Browse Source

Fixed json memory leak (#26)

Carl Husberg 1 year ago
parent
commit
71407c1fd4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      json.mod/glue.c

+ 1 - 0
json.mod/glue.c

@@ -126,6 +126,7 @@ BBObject * bmx_json_loads(BBString * text, int flags) {
 	
 	
 	json_error_t error;
 	json_error_t error;
 	json_t * js = json_loads(t, flags, &error);
 	json_t * js = json_loads(t, flags, &error);
+	free(t);
 	
 	
 	if (!js) {
 	if (!js) {
 		int errorCode = json_error_code(&error);
 		int errorCode = json_error_code(&error);