summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-03-23 11:27:50 -0600
committerJohn Stebbins <[email protected]>2016-03-23 11:27:50 -0600
commit50de7c3108c2c8513fbbddba9e5c9144a47a0431 (patch)
tree6df2ef7962ccf04bb705389cc058dc8039680521
parent23c03c6ec256c49fcfdc32604bca5171c57664f4 (diff)
presets: fix memory leak
-rw-r--r--libhb/preset.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libhb/preset.c b/libhb/preset.c
index 11d593f02..ac733a39e 100644
--- a/libhb/preset.c
+++ b/libhb/preset.c
@@ -3026,8 +3026,12 @@ hb_preset_index_t * hb_presets_get_default_index(void)
hb_dict_t * hb_presets_get_default(void)
{
- hb_preset_index_t *path = hb_presets_get_default_index();
- return hb_preset_get(path);
+ hb_dict_t * preset;
+ hb_preset_index_t * path = hb_presets_get_default_index();
+
+ preset = hb_preset_get(path);
+ free(path);
+ return preset;
}
char * hb_presets_get_default_json(void)