[x265] [PATCH] encoder: fix memory leak in param if fail to open encoder

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Wed Aug 13 18:27:41 CEST 2014


# HG changeset patch
# User Aarthi Thirumalai
# Date 1407925504 -19800
#      Wed Aug 13 15:55:04 2014 +0530
# Node ID 4aed508841e9abfb861093420d76ff99c5487b7a
# Parent  e13e1da57d203de93d44c0e432b490cad1bf0795
encoder: fix memory leak in param if fail to open encoder.

diff -r e13e1da57d20 -r 4aed508841e9 source/x265.cpp
--- a/source/x265.cpp	Wed Aug 13 15:53:00 2014 +0530
+++ b/source/x265.cpp	Wed Aug 13 15:55:04 2014 +0530
@@ -784,6 +784,7 @@
     {
         x265_log(param, X265_LOG_ERROR, "failed to open encoder\n");
         cliopt.destroy();
+        X265_FREE(param);
         x265_cleanup();
         exit(1);
     }


More information about the x265-devel mailing list