[x265] [PATCH 1 of 2] fix weight memory free bug on I400
Deepthi Nandakumar
deepthi at multicorewareinc.com
Tue Dec 29 12:23:57 CET 2015
On Tue, Dec 29, 2015 at 4:06 AM, Min Chen <chenm003 at 163.com> wrote:
> # HG changeset patch
> # User Min Chen <chenm003 at 163.com>
> # Date 1451340412 21600
> # Node ID f8daf6c38fec27b8b01f3a01df19c5a2252382b9
> # Parent 1471e4e433ccccf71f39a6eb93507c349fb8539e
> fix weight memory free bug on I400
> ---
> source/encoder/reference.cpp | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff -r 1471e4e433cc -r f8daf6c38fec source/encoder/reference.cpp
> --- a/source/encoder/reference.cpp Tue Dec 22 19:25:58 2015 +0530
> +++ b/source/encoder/reference.cpp Mon Dec 28 16:06:52 2015 -0600
> @@ -40,9 +40,9 @@
>
> MotionReference::~MotionReference()
> {
> - X265_FREE(weightBuffer[0]);
> - X265_FREE(weightBuffer[1]);
> - X265_FREE(weightBuffer[2]);
> + if (weightBuffer[0]) X265_FREE_ZERO(weightBuffer[0]);
> + if (weightBuffer[1]) X265_FREE_ZERO(weightBuffer[1]);
> + if (weightBuffer[2]) X265_FREE_ZERO(weightBuffer[2]);
>
Hmm, the x265_free(ptr) already checks for this. Does not assigning ptr to
NULL cause a double free?
> }
>
> int MotionReference::init(PicYuv* recPic, WeightParam *wp, const
> x265_param& p)
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
--
Deepthi Nandakumar
Engineering Manager, x265
Multicoreware, Inc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20151229/d4380fd9/attachment.html>
More information about the x265-devel
mailing list