Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Feb 2004 19:00:03 +0200
From:      Petri Helenius <pete@rommon.com>
To:        FreeBSD - net <freebsd-net@freebsd.org>
Subject:   malloc (0)
Message-ID:  <40378E93.3010804@rommon.com>

next in thread | raw e-mail | index | archive | help

I´m asking the net list because I came across this when browsing through 
the networking / resolver code.

The question is if the code should check for zero value before calling 
malloc or is malloc(0) legal if the pointer is never used?

I came across this when using dmalloc library and it started complaining 
about zero sized allocations from get_addrselectpolicy.

Pete



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40378E93.3010804>