From: chengyj1985 Date: Mon, 23 Sep 2019 07:22:28 +0000 (+0800) Subject: check ptr null before free X-Git-Tag: accepted/tizen/5.5/unified/20191031.010740^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F214471%2F2;p=platform%2Fupstream%2Flibav.git check ptr null before free Change-Id: If981ed89f6b223ba1e5a9ce61bce934aca97fea7 --- diff --git a/libavutil/mem.c b/libavutil/mem.c index 15c2880..cc00374 100644 --- a/libavutil/mem.c +++ b/libavutil/mem.c @@ -195,7 +195,8 @@ void av_free(void *ptr) #elif HAVE_ALIGNED_MALLOC _aligned_free(ptr); #else - free(ptr); + if (ptr) + free(ptr); #endif }