alloc-util: return NULL if 0-sized allocation is requested
authorDavid Tardon <dtardon@redhat.com>
Tue, 9 Oct 2018 14:53:43 +0000 (16:53 +0200)
committerDavid Tardon <dtardon@redhat.com>
Fri, 12 Oct 2018 12:51:35 +0000 (14:51 +0200)
commitc05107767b589e9aac9711eb385738887f86eb77
treef844cb90cbddc1cdc1021ef891ad296a1d3002ff
parent8192548ef792c7aa3202a27e060a2c4994f399f3
alloc-util: return NULL if 0-sized allocation is requested

That would almost certainly be an error (e.g., an overflow in computing
_need_), so it's better to fail.
src/basic/alloc-util.h