]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In reallocf(3), free the memory only when size != 0. Otherwise, when the
authorJaakko Heinonen <jh@FreeBSD.org>
Wed, 3 Mar 2010 15:43:26 +0000 (15:43 +0000)
committerJaakko Heinonen <jh@FreeBSD.org>
Wed, 3 Mar 2010 15:43:26 +0000 (15:43 +0000)
commit967e82cae01974f51547f61f104ea7b68d612965
treea9d8f1dab852c1239fe4b931c69acf8faa323a40
parent660df75e8b7bc5b1e381fa9bb06aba1c448eb40f
In reallocf(3), free the memory only when size != 0. Otherwise, when the
System V compatibility option (malloc "V" flag) is in effect a zero sized
reallocf() could cause a double free.

PR: bin/141753
Submitted by: Dan Lukes
lib/libc/stdlib/reallocf.c