• Travis Cross's avatar
    Return NULL from `sub_alloc` for zero size · 3c32dd3b
    Travis Cross 提交于
    When zero was passed for the size to `sub_alloc`, we were passing this
    size on to `malloc` or `calloc`, which is unusual enough that static
    analyzers warn about this (POSIX says that either NULL or a pointer
    will be returned).
    
    We'll instead just return NULL right away.
    3c32dd3b
su_alloc.c 45.8 KB