aiops.c and xmalloc

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Wed, 4 Oct 2000 15:37:37 +0200

 aiops.c has several xmallocs in form of:

    if ((requestp->path = (char *) xmalloc(len)) == NULL) {
        memPoolFree(aio_request_pool, requestp);
        errno = ENOMEM;
        return -1;
    }

 AFAIK xmalloc cannot ever return with NULL, so this check
 seems useless.

 Is it there for some reason or is just remains since times
 when xmalloc was not used?

 Is there any reason why aiops needs to copy path strings
 into private membuffer instead of just miving pointer?

 I'm looking into possible memleaks in aiops and I wanted to
 convert it into using memPools.

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Wed Oct 04 2000 - 07:40:43 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:40 MST