From bafa57c12cc62acc8370331b2b254ea8b51725fa Mon Sep 17 00:00:00 2001
From: jstebbins <jstebbins.hb@gmail.com>
Date: Fri, 19 Dec 2014 00:22:37 +0000
Subject: [PATCH] json: fix memory leak in hb_get_preview_json

forgot to call hb_image_close on the image


git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6610 b64f7644-9d1e-0410-96f1-a4d463321fa5
---
 libhb/hb_json.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libhb/hb_json.c b/libhb/hb_json.c
index 4e4e09dcb..401607f7b 100644
--- a/libhb/hb_json.c
+++ b/libhb/hb_json.c
@@ -1287,6 +1287,7 @@ char* hb_get_preview_json(hb_handle_t * h, const char *json_param)
         json_array_append_new(planes, plane_dict);
     }
     json_object_set_new(dict, "Planes", planes);
+    hb_image_close(&image);
 
     char *result = json_dumps(dict, JSON_INDENT(4)|JSON_PRESERVE_ORDER);
     json_decref(dict);
-- 
2.40.0