]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In reallocf(3), free the memory only when size != 0. Otherwise, when the
authorjh <jh@FreeBSD.org>
Wed, 3 Mar 2010 15:43:26 +0000 (15:43 +0000)
committerjh <jh@FreeBSD.org>
Wed, 3 Mar 2010 15:43:26 +0000 (15:43 +0000)
commitc5a3b40d67289d8bb591d76ed3c0d1b8ad5715a8
treea9d8f1dab852c1239fe4b931c69acf8faa323a40
parentacf511e4d0cb788a9a050ea1aefef0548aa329ab
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