X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fbudb%2Fprocs.c;h=868aea4bfb024c210c027ca85e04cd69962ee010;hp=90afeaebe4388cd2c0b4ce7369d808f11032117b;hb=03c04c081a170668e52127be3c150582e458e1ed;hpb=429b9ec350670a9d51948fff3e555371a45f7905 diff --git a/src/budb/procs.c b/src/budb/procs.c index 90afeae..868aea4 100644 --- a/src/budb/procs.c +++ b/src/budb/procs.c @@ -534,9 +534,12 @@ SendReturnList(struct ubik_trans *ut, /* Allocate space for the return values if needed and zero it */ if (eList->budb_dumpList_val == 0) { - eList->budb_dumpList_val = calloc(to_return, e_size); - if (!eList->budb_dumpList_val) - return (BUDB_NOMEM); + if (to_return > 0) { + eList->budb_dumpList_val = calloc(to_return, e_size); + if (!eList->budb_dumpList_val) + return (BUDB_NOMEM); + } else + eList->budb_dumpList_val = NULL; } else { memset(eList->budb_dumpList_val, 0, e_size * to_return); }